- stage编排
stages:
- testing # stage编排
- build
- deploy
run_test: #Job
stage: testing
tags:
- shell #Gitlab-runner
script:
- echo "执行测试"
build_image:
stage: build
tags:
- shell
script:
- echo "打包镜像"
deploy_to_qa:
stage: deploy
tags:
- shell
script:
- echo "部署到QA"
执行结果:
- needs依赖性
Job1:
Stage: A
Job2:
Stage: B
needs: ["Job1"]