From: Luis Gomez Date: Sat, 8 Apr 2017 03:40:10 +0000 (-0700) Subject: Add boolean parameter to run test after build X-Git-Tag: release/carbon~165^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=8f94561fbf897374e368dc927c4a6b322044b856;p=releng%2Fbuilder.git Add boolean parameter to run test after build By default multiplatch builds all patches but does not run test unless new parameter RUNTEST is set to true. Also fix variable name in multipatch script. Change-Id: I75407b0508395db76387dd44b5c4cff73ed8648d Signed-off-by: Luis Gomez --- diff --git a/jjb/integration/include-raw-integration-multipatch-distribution-test.sh b/jjb/integration/include-raw-integration-multipatch-distribution-test.sh index 70aa31ace..bf1ce351f 100644 --- a/jjb/integration/include-raw-integration-multipatch-distribution-test.sh +++ b/jjb/integration/include-raw-integration-multipatch-distribution-test.sh @@ -9,7 +9,7 @@ # create a fresh empty place to build this custom distribution BUILD_DIR=${WORKSPACE}/patch_tester POM_FILE=${WORKSPACE}/patch_tester/pom.xml -DISTRIBUTION_BRANCH_TO_BUILD=$BRANCH #renaming variable for clarity +DISTRIBUTION_BRANCH_TO_BUILD=$DISTROBRANCH #renaming variable for clarity rm -rf $BUILD_DIR mkdir -p $BUILD_DIR diff --git a/jjb/integration/integration-test-jobs.yaml b/jjb/integration/integration-test-jobs.yaml index 359bd3f79..cf0054646 100644 --- a/jjb/integration/integration-test-jobs.yaml +++ b/jjb/integration/integration-test-jobs.yaml @@ -346,6 +346,8 @@ parameters: - patches-to-build-parameter: patches_to_build: '$PATCHES_TO_BUILD' + - run-test-parameter: + run-test: 'false' - integration-distribution-branch: branch: '{branch}' - opendaylight-infra-parameters: @@ -385,11 +387,15 @@ post-step-run-condition: 'SUCCESS' postbuilders: - - trigger-builds: - - project: '{csit-list}' - block: true - predefined-parameters: - BUNDLEURL=$BUNDLEURL + - conditional-step: + condition-kind: boolean-expression + condition-expression: $RUNTEST + steps: + - trigger-builds: + - project: '{csit-list}' + block: true + predefined-parameters: + BUNDLEURL=$BUNDLEURL publishers: - opendaylight-infra-shiplogs: diff --git a/jjb/releng-macros.yaml b/jjb/releng-macros.yaml index a6a58855b..140892540 100644 --- a/jjb/releng-macros.yaml +++ b/jjb/releng-macros.yaml @@ -75,6 +75,14 @@ default: '' description: 'csv list of patches in project:changeset format to build distribution with' +- parameter: + name: run-test-parameter + parameters: + - string: + name: RUNTEST + default: '{run-test}' + description: 'Set true to run test after build' + - parameter: name: distribution-branch-to-build-parameter parameters: