stages:# 指定运行的步骤,没有指定就顺序执行-build-deploy-testbuild1:# job 的名称tags:-k8s# 运行的 runner 标签stage:buildscript:-echo"Do your build here"test1:stage:testscript:-echo"Do a test here"-echo"For example run a test suite"test2:stage:testscript:-echo"Do another parallel test her...
stages:# 指定运行的步骤,没有指定就顺序执行-build-deploy-testbuild1:# job 的名称tags:-k8s# 运行的 runner 标签stage:buildscript:-echo "Do your build here"test1:stage:testscript:-echo "Do a test here"-echo "For example run a test suite"test2:stage:testscript:-echo "Do another parallel te...
stages: # 指定运行的步骤,没有指定就顺序执行- build- deploy- testbuild1: # job 的名称tags:- k8s # 运行的 runner 标签stage: buildscript:- echo "Do your build here"test1:stage: testscript:- echo "Do a test here"- echo "For example run a test suite"test2:stage: testscript:- echo "...
# 注意,这里我们使用了基于alpine的镜像来减小大小;使用 --restart 标识来自动重启 docker run -d --name gitlab-runner --restart always \ -v /data/gitlab-runner/config:/etc/gitlab-runner \ -v /data/gitlab-runner/home:/home/gitlab-runner \ -v /var/run/docker.sock:/var/run/docker.sock ...
job: artifacts: name:"$CI_JOB_STAGE-$CI_COMMIT_REF_NAME"paths:- binaries/ artifacts:when 用于在作业失败时或尽管失败而上传工件。on_success仅在作业成功时上载工件。这是默认值。on_failure仅在作业失败时上载工件。always 上载工件,无论作业状态如何。
job1:stage:testscript:-execute_script_that_will_failallow_failure:true when on_success前面阶段中的所有作业都成功(或由于标记为allow_failure而被视为成功)时才执行作业。这是默认值。on_failure当前面阶段出现失败则执行。 always 执行作业,而不管先前阶段的作业状态如何,放到最后执行。总是执行。
Run a manual job To run a manual job, you must have permission to merge to the assigned branch: Go to the pipeline, job,environment, or deployment view. Next to the manual job, selectRun( ). You can alsoadd custom CI/CD variables when running a manual job. ...
when关键字是实现在发生故障或尽管发生故障时仍能运行的作业。比如你要在任务失败后需要触发一个job, 或者你需要手动执行任务,或者当你一个任务执行成功后,执行另一个任务. on_success 所有任务执行成功后 on_failure 当至少一个任务失败后 always 执行作业,而不考虑作业在早期阶段的状态。
The GitLab Handbook GitLab TeamOps Handbook Job Families Reports The Handbook GitLab Values About GitLab About the Handbook Acquisitions Handbook Board of Directors and Corporate Governance CEO Customer Success Engineering Enterprise Data Team Entity-Specific Information Executive Business...
GitLab TeamOps Handbook Job Families The Handbook GitLab Values About GitLab About the Handbook Acquisitions Handbook Board of Directors and Corporate Governance CEO Customer Success Engineering Enterprise Data Team Entity-Specific Information Executive Business Administrators Finance GitLab...