我设置了我的第一个GitLab Ci Pipeline,包括docker来运行我的项目.我想把我的管道分成几个阶段,所以我创建了"build","test"和"clean-build".
在这种情况下一切正常:
stages:
- build
- test
- clean
image: docker:latest
services:
- docker:dind
before_script:
- export RELEASE=${CI_BUILD_REF_NAME}
- docker version
build:
stage: build
tags:
- sendis-dind
script:
- echo "Hallo in Build Stage"
test:
stage: test
tags:
- sendis-dind
script:
- echo "Hallo in TEST Stage"
clean-build:
stage: clean
tags:
- sendis-dind
script:
- echo "Hallo beim Clean Up"
when: always
Run Code Online (Sandbox Code Playgroud)
所有3个阶段都成功运行
但这失败了:
stages:
- build
- test
- clean
image: docker:latest
services:
- docker:dind
before_script:
- …Run Code Online (Sandbox Code Playgroud)