Commit d7e4c199 authored by Manuel Moos's avatar Manuel Moos
Browse files

Also abort docker deploy if a more recent build is in the pipe

parent 8d4d3676
Pipeline #237824178 passed with stages
in 37 minutes and 26 seconds
......@@ -360,6 +360,14 @@ deploy_docker:
when: on_success
- when: never
script:
# test whether we're current
- tagfile=/messageboard/current_pipeline_${CI_COMMIT_REF_NAME}
- if ! echo ${CI_COMMIT_REF_NAME} | grep -q ^release && test -r ${tagfile} && ! test ${CI_PIPELINE_IID} == `cat ${tagfile}`; then
- echo "A newer build is already in the pipeline, abort."
- exit 0
- fi
# build
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY 2>&1 | grep -v WARNING\|credential || exit $?
- make -C gitlab_build/docker/build unstaged_deploy_docker.tag || exit $?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment