queue for runners to retain order

This commit is contained in:
Martin Diehl 2017-04-15 12:07:59 +02:00
parent 2b21d72c6b
commit 62dd57313e
1 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ variables:
#================================================================================================
# Shortcut names
#================================================================================================
DAMASKROOT: "$HOME/GitlabCI_Pipeline_$CI_PIPELINE_ID/DAMASK"
DAMASKROOT: "$HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID/DAMASK"
#================================================================================================
# Names of module files to load
@ -79,8 +79,8 @@ variables:
checkout:
stage: prepareAll
before_script:
- while [ -e $HOME/GitLabCI.lock ]; do sleep 5m; done
- echo $CI_PIPELINE_ID > $HOME/GitLabCI.lock
- echo $CI_PIPELINE_ID >> $HOME/GitLabCI.queue
- while [ "$(awk '/$CI_PIPELINE_ID/{print NR}' GitLabCI.queue)" -ne 1 ];do sleep 5m; done
script:
- mkdir -p $DAMASKROOT
- git clone -q git@magit1.mpie.de:damask/DAMASK.git $DAMASKROOT
@ -484,7 +484,7 @@ removeLock:
before_script:
- echo 'Do nothing'
when: always
script: if grep -q $CI_PIPELINE_ID $HOME/GitLabCI.lock; then rm $HOME/GitLabCI.lock; fi
script: sed -i '/$CI_PIPELINE_ID/d' GitLabCI.queue
except:
- master
- release