Commit 8892b913 authored by Manuel Moos's avatar Manuel Moos
Browse files

Merge from release_0.2.8.3

parents a1f6e99e a24aad19
Pipeline #238302225 passed with stages
in 33 minutes and 58 seconds
......@@ -213,8 +213,6 @@ deploy-staged:
- ./docker/deploy/prepare_deploy.sh || exit $?
script:
# mark
- echo ${CI_PIPELINE_IID} > /messageboard/current_pipeline_${CI_COMMIT_REF_NAME}
# now enter the docker build directory and just invoke make there
- cd gitlab_build/docker/build
- make staged_deploy -O -j$(nproc) -k
......@@ -256,11 +254,7 @@ deploy-release:
- ./docker/scripts/fix_gits.sh || exit $?
- ./docker/deploy/prepare_deploy.sh || exit $?
script:
- 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
- docker/scripts/obsolete.sh || exit 0
# now enter the docker build directory and just invoke make there
- cd gitlab_build/docker/build
......
#!/bin/bash
# returns an error if a later build pipeline is already running
# to be used in .gitlab-ci.yml as
# docker/scripts/obsolete.sh || exit 0
wget ${CI_SERVER_URL}/api/v4/projects/${CI_PROJECT_ID}/pipelines -O pipelines.json
EXIT=1
# remove any newlines
# add newlines between pipelines
# pick those from the same branch
# pick the first one
# check whether it's our run
tr -d '\n' < pipelines.json \
| sed -e 's/}[^{]*,[^}]*{/\n/g' \
| grep \"ref\":\"${CI_COMMIT_REF_NAME}\" \
| head -n 1 \
| grep -q \"id\":${CI_PIPELINE_ID} && EXIT=$?
if test ${EXIT} != 0; then
echo "A later pipeline is already running."
fi
rm pipelines.json
exit ${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