more robust update of VERSION file
update version only if no push to development has occured in the meantime. Less error prone. Very small change for race condition remains
This commit is contained in:
parent
6da3f0fa51
commit
6324ffcb9e
|
@ -172,6 +172,10 @@ Marc:
|
|||
###################################################################################################
|
||||
grid_runtime:
|
||||
stage: performance
|
||||
before_script:
|
||||
- ${LOCAL_HOME}/bin/queue ${CI_JOB_ID} --blocking
|
||||
- source env/DAMASK.sh
|
||||
- echo Job start:" $(date)"
|
||||
script:
|
||||
- module load ${COMPILER_INTEL} ${MPI_INTEL} ${PETSC_INTEL}
|
||||
- cd $(mktemp -d)
|
||||
|
@ -186,10 +190,6 @@ grid_runtime:
|
|||
--output_dir ./
|
||||
--tag ${CI_COMMIT_SHA}
|
||||
- if [ ${CI_COMMIT_BRANCH} == development ]; then git commit -am ${CI_PIPELINE_ID}_${CI_COMMIT_SHA}; git push; fi
|
||||
before_script:
|
||||
- ${LOCAL_HOME}/bin/queue ${CI_JOB_ID} --blocking
|
||||
- source env/DAMASK.sh
|
||||
- echo Job start:" $(date)"
|
||||
|
||||
|
||||
###################################################################################################
|
||||
|
@ -209,19 +209,10 @@ update_revision:
|
|||
script:
|
||||
- cd $(mktemp -d)
|
||||
- git clone -q git@git.damask.mpie.de:damask/DAMASK.git .
|
||||
- git checkout ${CI_COMMIT_SHA}
|
||||
- export VERSION=$(git describe)
|
||||
- git pull
|
||||
- export VERSION=$(git describe ${CI_COMMIT_SHA})
|
||||
- echo ${VERSION} > python/damask/VERSION
|
||||
- git add python/damask/VERSION
|
||||
- git commit -m "[skip ci] updated version information after successful test of $VERSION"
|
||||
- export UPDATEDREV=$(git describe) # tested state + 1 commit
|
||||
- git checkout master
|
||||
- git pull
|
||||
- git merge $UPDATEDREV -s recursive -X ours # conflicts occur only for inconsistent state
|
||||
- git push
|
||||
- git checkout development
|
||||
- git pull
|
||||
- git merge master -s recursive -X ours -m "[skip ci] Merge branch 'master' into development" # 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
|
||||
- git commit python/damask/VERSION -m "[skip ci] updated version information after successful test of $VERSION"
|
||||
- if [ ${CI_COMMIT_SHA} == $(git rev-parse HEAD^) ]; then git push origin HEAD:master HEAD:development; fi
|
||||
only:
|
||||
- development
|
||||
|
|
Loading…
Reference in New Issue