Add boolean parameter to run test after build 40/54540/4
authorLuis Gomez <ecelgp@gmail.com>
Sat, 8 Apr 2017 03:40:10 +0000 (20:40 -0700)
committerLuis Gomez <ecelgp@gmail.com>
Sun, 9 Apr 2017 19:14:29 +0000 (12:14 -0700)
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 <ecelgp@gmail.com>
jjb/integration/include-raw-integration-multipatch-distribution-test.sh
jjb/integration/integration-test-jobs.yaml
jjb/releng-macros.yaml

index 70aa31ace6cf62763cf4b35a031529fccba68c4c..bf1ce351f1f04da29d4f6bf7fd9efb0d129d1f26 100644 (file)
@@ -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
index 359bd3f7981af55de97c5530f771cfd2f712ef13..cf00546468162de93b1960de9229d51d1149de36 100644 (file)
     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:
       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:
index a6a58855be87f4815dfa355c6eb2fd92529b7d58..140892540de55300d00d5a66efe6dba902f39529 100644 (file)
           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: