首页 > 其他分享 > GitLab CICD Day 06 - 執行外部檔案

GitLab CICD Day 06 - 執行外部檔案

时间:2023-02-13 22:02:16浏览次数:56  
标签:testing run 外部 CICD GitLab echo sh 06 stage

  1. 新建run.sh(同级目录)
echo "hello world from external file"

2。 编写.gitlab-ci.yml

stages:
- testing # stage编排
- build
- deploy



run_test: #Job
stage: testing
tags:
- shell #Gitlab-runner
script:
- echo "执行测试"
- chmod +x ./run.sh # 给run.sh加可执行权限
- ./run.sh # 运行外部文件./run.sh
  1. 运行结果:

 GitLab CICD Day 06 - 執行外部檔案_ci


标签:testing,run,外部,CICD,GitLab,echo,sh,06,stage
From: https://blog.51cto.com/u_12391275/6054725

相关文章