pipeline-20220519.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. version: '1.0'
  2. name: pipeline-20220519
  3. displayName: pipeline-20220519
  4. triggers:
  5. trigger: manual
  6. push:
  7. branches:
  8. prefix:
  9. - ''
  10. stages:
  11. - name: stage-f911a4d4
  12. displayName: 编译
  13. strategy: naturally
  14. trigger: auto
  15. executor: []
  16. steps:
  17. - step: build@nodejs
  18. name: build_nodejs
  19. displayName: Nodejs 构建
  20. nodeVersion: 14.16.0
  21. commands:
  22. - '# 设置NPM源,提升安装速度'
  23. - ''
  24. - npm config set registry https://registry.npmmirror.com
  25. - ''
  26. - ''
  27. - ''
  28. - '# 执行编译命令'
  29. - ''
  30. - npm install && npm run build
  31. artifacts:
  32. - name: BUILD_ARTIFACT
  33. path:
  34. - ./dist
  35. caches:
  36. - ~/.npm
  37. - ~/.yarn
  38. strategy:
  39. retry: '0'
  40. - name: stage-dbe565b9
  41. displayName: 部署
  42. strategy: naturally
  43. trigger: auto
  44. executor: []
  45. steps:
  46. - step: deploy@agent
  47. name: deploy_agent
  48. displayName: 主机部署
  49. hostGroupID: qiwen
  50. deployArtifact:
  51. - source: build
  52. name: qiwen-file-web
  53. target: ~/gitee_go/deploy/qiwen-file-web
  54. dependArtifact: BUILD_ARTIFACT
  55. script:
  56. - '# 请在此输入部署脚本,如启动Java应用如下'
  57. - '# nohup java -jar test.jar > nohup.out &'
  58. - cd ~/gitee_go/deploy/qiwen-file-web
  59. - tar -zxvf qiwen-file-web.tar.gz
  60. - rm -r /home/html/opensoftware/file
  61. - cp -r dist /home/html/opensoftware/file
  62. - ' echo ''Hello Gitee!'''
  63. strategy:
  64. retry: '0'