1234567891011121314151617181920212223242526272829303132333435363738394041 |
- kind: pipeline # 定义对象类型,还有secret和signature两种类型
- type: docker # 定义流水线类型,还有kubernetes、exec、ssh等类型
- name: veterans_company # 定义流水线名称
- steps:
- - name: package
- image: node:16.19.0-bullseye-slim
- volumes:
- - name: node-cache
- path: /drone/src/node_modules
- - name: node-build
- path: /tmp
- commands:
- - npm install --registry=https://registry.npmmirror.com/
- - npm run build
- - mkdir -p /tmp/veterans_company/dist
- - cp -r dist/* /tmp/veterans_company/dist
- - name: build-start
- image: appleboy/drone-ssh
- settings:
- host: 172.16.90.64
- username: root
- password:
- from_secret: 64_ssh_pw
- port: 22
- command_timeout: 5m
- script:
- - mv /www/wwwroot/veterhCompany/ /tmp/$(uuidgen)
- - mkdir -p /www/wwwroot/veterhCompany
- - cp -r /mydata/node/build/veterans_company/dist/* /www/wwwroot/veterhCompany
- volumes:
-
- - name: node-cache
- host:
- path: /mydata/node/cache
- - name: node-build
-
- host:
- path: /mydata/node/build
|