refactor: .devops/build_and_check.yml

This commit is contained in:
xxq250 2023-03-30 10:05:11 +08:00 committed by jianmu
parent 633e07c71e
commit 18da18adf9
1 changed files with 36 additions and 34 deletions

View File

@ -21,13 +21,6 @@ workflow:
task: end task: end
needs: needs:
- dingtalk_notice_text_0 - dingtalk_notice_text_0
- ref: shell_0
name: 安装依赖包
image: docker.jianmuhub.com/library/alpine:3.17.0
script:
- echo "success"
needs:
- git_clone_0
- ref: git_clone_0 - ref: git_clone_0
name: git clone name: git clone
task: git_clone@1.2.6 task: git_clone@1.2.6
@ -38,32 +31,6 @@ workflow:
depth: 1 depth: 1
needs: needs:
- start - start
- ref: shell_1
name: 检测代码
image: docker.jianmuhub.com/library/alpine:3.17.0
script:
- sh ../check_code.sh
needs:
- git_clone_0
- ref: dingtalk_notice_text_0
name: 钉钉通知-文本
task: dingtalk_notice_text@1.0.2
input:
boot_webhook_url: ((ding_notice.webhook))
secret: ((ding_notice.secret))
msg_text: '""'
at_user_ids: '"[]"'
at_mobiles: '"[]"'
needs:
- ssh_cmd_0
- ref: shell_2
name: 打包完成
image: docker.jianmuhub.com/library/alpine:3.17.0
script:
- echo "build success"
needs:
- shell_1
- shell_0
- ref: scp_resource_0 - ref: scp_resource_0
name: scp发布到服务器 name: scp发布到服务器
task: scp_resource@1.4.1 task: scp_resource@1.4.1
@ -75,7 +42,7 @@ workflow:
local_file: '""' local_file: '""'
file_content: '""' file_content: '""'
needs: needs:
- shell_2 - number_1
- ref: ssh_cmd_0 - ref: ssh_cmd_0
name: 执行发布命令 name: 执行发布命令
task: ssh_cmd@1.1.1 task: ssh_cmd@1.1.1
@ -86,4 +53,39 @@ workflow:
ssh_cmd: '""' ssh_cmd: '""'
needs: needs:
- scp_resource_0 - scp_resource_0
- ref: number_0
name: 代码检测
task: star/number@1.0.0-java11
input:
expression: '"6+2"'
needs:
- git_clone_0
- ref: number_1
name: 编译打包
task: star/number@1.0.0-java11
input:
expression: '""+((number_0.result))+ ((number_2.result))'
needs:
- number_0
- number_2
- ref: number_2
name: 安装依赖包
task: star/number@1.0.0-java11
input:
expression: '"7+2"'
needs:
- git_clone_0
- ref: dingtalk_notice_text_0
name: 钉钉通知-文本
task: dingtalk_notice_text@1.0.2
input:
boot_webhook_url: ((ding_notice.webhook))
secret: ((ding_notice.secret))
msg_text: '"【"+((trigger.user)) +
"】从"+((trigger.source_branch))+"提交PR到"+((trigger.target_branch)) +
",请您立即确认是否合并。"'
at_user_ids: '"[]"'
at_mobiles: '"[]"'
needs:
- ssh_cmd_0