31 lines
630 B
YAML
31 lines
630 B
YAML
|
kind: pipeline
|
||
|
name: default
|
||
|
|
||
|
steps:
|
||
|
- name: build
|
||
|
image: node:16.20.2
|
||
|
volumes:
|
||
|
- name: build-file
|
||
|
path: /build/dist
|
||
|
commands:
|
||
|
- npm config set registry https://registry.npm.taobao.org/
|
||
|
- npm install
|
||
|
- npm run build
|
||
|
- cp -r dist/. /build/dist
|
||
|
# - ls
|
||
|
# - cd dist
|
||
|
# - ls
|
||
|
|
||
|
#- name: test
|
||
|
# image: node:16.18.1
|
||
|
# commands:
|
||
|
# - npm run test
|
||
|
|
||
|
#- name: deploy
|
||
|
# image: nginx:1.21
|
||
|
# commands:
|
||
|
# - cp -r dist/. /usr/share/nginx/html
|
||
|
volumes: # 定义流水线挂载目录,用于共享数据
|
||
|
- name: build-file
|
||
|
host:
|
||
|
path: /root/crm-build/test # 从宿主机中挂载的目录
|