kind: pipeline name: default steps: - name: build image: node:16.18.1 volumes: - name: build-file path: /root/crm-build/dist # 容器内路径 host: path: /build/dist # 宿主机路径 commands: - npm install - npm run build - cp -r dist /build # - 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