From 7fda62fc3dbd924a7b1270d9d6378a03e1c66ddf Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 31 Oct 2021 08:38:09 +0000 Subject: [PATCH] Move post build actions to Common scripts --- build/postactions.groovy | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 build/postactions.groovy diff --git a/build/postactions.groovy b/build/postactions.groovy new file mode 100644 index 0000000..5a9ea09 --- /dev/null +++ b/build/postactions.groovy @@ -0,0 +1,55 @@ + +def performSuccessfulBuildActions() { + if (DOXYGEN_DEPLOY_JOB) { + build( + wait: false, + job: DOXYGEN_DEPLOY_JOB, + parameters: [ + string(name: 'BUILD_JOB_WITH_DOXYGEN_ARTIFACTS', value: JOB_NAME), + string(name: 'BUILD_JOB_WITH_DOXYGEN_ARTIFACTS_SELECTOR', value: " ${BUILD_NUMBER}"), + ] + ) + } + if (STATIC_ANALYSIS_JOB) { + build( + wait: false, + job: STATIC_ANALYSIS_JOB, + parameters: [ + string(name: 'APPLICATION_ARTIFACT_PROJECT', value: JOB_NAME), + string(name: 'APPLICATION_ARTIFACT_SELECTOR', value: " ${BUILD_NUMBER}"), + ] + ) + } + if (UNIT_TEST_JOB) { + build( + wait: false, + job: UNIT_TEST_JOB, + parameters: [ + string(name: 'APPLICATION_ARTIFACT_PROJECT', value: JOB_NAME), + string(name: 'APPLICATION_ARTIFACT_SELECTOR', value: " ${BUILD_NUMBER}"), + ] + ) + } + if (REGRESSION_TEST_JOB) { + build( + wait: false, + job: REGRESSION_TEST_JOB, + parameters: [ + string(name: 'APPLICATION_ARTIFACT_PROJECT', value: JOB_NAME), + string(name: 'APPLICATION_ARTIFACT_SELECTOR', value: " ${BUILD_NUMBER}"), + ] + ) + } + if (RELEASE_TO_GIT_JOB) { + build( + wait: false, + job: RELEASE_TO_GIT_JOB, + parameters: [ + string(name: 'BUILD_JOB', value: JOB_NAME), + string(name: 'BUILD_JOB_SELECTOR', value: " ${BUILD_NUMBER}"), + ] + ) + } +} + +return this;