qiwen-file-web/.workflow/pipeline-20220519.yml
2024-08-26 09:43:30 +08:00

68 lines
1.7 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: '1.0'
name: pipeline-20220519
displayName: pipeline-20220519
triggers:
trigger: manual
push:
branches:
prefix:
- ''
stages:
- name: stage-f911a4d4
displayName: 编译
strategy: naturally
trigger: auto
executor: []
steps:
- step: build@nodejs
name: build_nodejs
displayName: Nodejs 构建
nodeVersion: 14.16.0
commands:
- '# 设置NPM源提升安装速度'
- ''
- npm config set registry https://registry.npmmirror.com
- ''
- ''
- ''
- '# 执行编译命令'
- ''
- npm install && npm run build
artifacts:
- name: BUILD_ARTIFACT
path:
- ./dist
caches:
- ~/.npm
- ~/.yarn
strategy:
retry: '0'
- name: stage-dbe565b9
displayName: 部署
strategy: naturally
trigger: auto
executor: []
steps:
- step: deploy@agent
name: deploy_agent
displayName: 主机部署
hostGroupID:
ID: qiwen
hostID:
- 4e449710-088b-4e36-acd7-bcf7958ffcda
deployArtifact:
- source: build
name: qiwen-file-web
target: ~/gitee_go/deploy/qiwen-file-web
dependArtifact: BUILD_ARTIFACT
script:
- '# 请在此输入部署脚本如启动Java应用如下'
- '# nohup java -jar test.jar > nohup.out &'
- cd ~/gitee_go/deploy/qiwen-file-web
- tar -zxvf qiwen-file-web.tar.gz
- rm -rf /home/html/file
- cp -r dist /home/html/file
- ' echo ''Hello Gitee!'''
strategy:
retry: '0'