From 8f94561fbf897374e368dc927c4a6b322044b856 Mon Sep 17 00:00:00 2001 From: Luis Gomez Date: Fri, 7 Apr 2017 20:40:10 -0700 Subject: [PATCH] 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 --- ...w-integration-multipatch-distribution-test.sh | 2 +- jjb/integration/integration-test-jobs.yaml | 16 +++++++++++----- jjb/releng-macros.yaml | 8 ++++++++ 3 files changed, 20 insertions(+), 6 deletions(-) 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: -- 2.36.6