still need clean stage

after_script does not run for failed/cancelled scripts.
This commit is contained in:
Martin Diehl 2021-11-13 16:33:31 +01:00
parent 352a168621
commit 06edd39a93
1 changed files with 17 additions and 4 deletions

View File

@ -8,18 +8,19 @@ stages:
- performance - performance
- deploy - deploy
- update_master - update_master
- clean
################################################################################################### ###################################################################################################
default: default:
before_script: before_script:
- ${LOCAL_HOME}/bin/manage_pool ${CI_JOB_ID} --nonblocking - ${LOCAL_HOME}/bin/manage_pool -j ${CI_JOB_ID} -p ${CI_PIPELINE_ID} --nonblocking
- source $DAMASKROOT/env/DAMASK.sh - source $DAMASKROOT/env/DAMASK.sh
- export PATH=${BINDIR}:$PATH - export PATH=${BINDIR}:$PATH
- cd $DAMASKROOT/PRIVATE/testing - cd $DAMASKROOT/PRIVATE/testing
- echo Job start:" $(date)" - echo Job start:" $(date)"
after_script: after_script:
- ${LOCAL_HOME}/bin/manage_pool ${CI_JOB_ID} --unregister - ${LOCAL_HOME}/bin/manage_pool -j ${CI_JOB_ID} -p ${CI_PIPELINE_ID} --unregister
- echo Job end:" $(date)" - echo Job end:" $(date)"
@ -59,7 +60,7 @@ variables:
checkout: checkout:
stage: prepare stage: prepare
before_script: before_script:
- ${LOCAL_HOME}/bin/manage_pool ${CI_JOB_ID} --nonblocking - ${LOCAL_HOME}/bin/manage_pool -j ${CI_JOB_ID} -p ${CI_PIPELINE_ID} --nonblocking
- echo Job start:" $(date)" - echo Job start:" $(date)"
script: script:
- mkdir -p ${DAMASKROOT} - mkdir -p ${DAMASKROOT}
@ -169,7 +170,7 @@ grid_runtime:
- if [ ${CI_COMMIT_BRANCH} == development ]; then git commit -am ${CI_PIPELINE_ID}_${CI_COMMIT_SHA}; git push; fi - if [ ${CI_COMMIT_BRANCH} == development ]; then git commit -am ${CI_PIPELINE_ID}_${CI_COMMIT_SHA}; git push; fi
resource_group: runtime resource_group: runtime
before_script: before_script:
- ${LOCAL_HOME}/bin/manage_pool ${CI_JOB_ID} --blocking - ${LOCAL_HOME}/bin/manage_pool -j ${CI_JOB_ID} -p ${CI_PIPELINE_ID} --blocking
################################################################################################### ###################################################################################################
@ -202,3 +203,15 @@ merge_into_master:
- git push origin development # development is unchanged (as master is based on it) but has updated VERSION file - git push origin development # development is unchanged (as master is based on it) but has updated VERSION file
only: only:
- development - development
###################################################################################################
clean_pool:
stage: clean
script:
- ${LOCAL_HOME}/bin/manage_pool -p ${CI_PIPELINE_ID} --clean
when: always
before_script:
- echo Job start:" $(date)"
after_script:
- echo Job end:" $(date)"