trying to avoid conflicts when updating master and development, only one pipeline at the same time
This commit is contained in:
parent
f166ba4c9a
commit
4bcefa992b
|
@ -16,6 +16,7 @@ stages:
|
|||
- example
|
||||
- updateMaster
|
||||
- createDocumentation
|
||||
- clean
|
||||
|
||||
###################################################################################################
|
||||
before_script:
|
||||
|
@ -78,11 +79,14 @@ variables:
|
|||
checkout:
|
||||
stage: prepareAll
|
||||
before_script:
|
||||
- echo 'Do nothing'
|
||||
- $HOME/wait.sh
|
||||
- echo $CI_PIPELINE_ID > $HOME/GitLabCI.lock
|
||||
script:
|
||||
- mkdir -p $DAMASKROOT
|
||||
- git clone -b GitLabRunner git@magit1.mpie.de:damask/DAMASK.git $DAMASKROOT
|
||||
- git clone git@magit1.mpie.de:damask/PRIVATE.git $DAMASKROOT/PRIVATE
|
||||
- git clone git@magit1.mpie.de:damask/DAMASK.git $DAMASKROOT
|
||||
- cd $DAMASKROOT
|
||||
- git checkout $CI_COMMIT_SHA git@magit1.mpie.de:damask/DAMASK.git
|
||||
- git clone git@magit1.mpie.de:damask/PRIVATE.git
|
||||
- eval 'source $DAMASKROOT/DAMASK_env.sh'
|
||||
- make -C $DAMASKROOT install
|
||||
|
||||
|
@ -304,15 +308,16 @@ mergeIntoMaster:
|
|||
only:
|
||||
- development
|
||||
script:
|
||||
- eval 'cd $DAMASKROOT'
|
||||
- export DEVREV=$(git describe)
|
||||
- git commit VERSION -m "[skip ci] updated version information after successful test of $DEVREV"
|
||||
- cd $DAMASKROOT
|
||||
- export TESTEDREV=$(git describe) # might be detached from development branch
|
||||
- git commit VERSION -m "[skip ci] updated version information after successful test of $TESTEDREV"
|
||||
- export UPDATEDREV=$(git describe) # tested state + 1 commit
|
||||
- git checkout master
|
||||
- git merge development
|
||||
- git status
|
||||
- git push origin master
|
||||
- git merge $UPDATEDREV
|
||||
- git push origin master # master is now tested version and has updated VERSION file
|
||||
- git checkout development
|
||||
- git push origin development
|
||||
- git merge master -s ours # only possible conflict is in VERSION file
|
||||
- git push origin development # development is unchanged (as master is based on it) but has updated VERSION file
|
||||
|
||||
###################################################################################################
|
||||
AbaqusExp:
|
||||
|
@ -338,3 +343,11 @@ Spectral:
|
|||
script:
|
||||
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel $Doxygen
|
||||
- $DAMASKROOT/PRIVATE/documenting/runDoxygen.sh $DAMASKROOT spectral
|
||||
|
||||
###################################################################################################
|
||||
removeLock:
|
||||
stage: clean
|
||||
before_script:
|
||||
- echo 'Do nothing'
|
||||
when: always
|
||||
script: rm $HOME/GitLabCI.lock
|
||||
|
|
Loading…
Reference in New Issue