Add knob to execute any project normal build 46/81546/5
authorLuis Gomez <ecelgp@gmail.com>
Thu, 11 Apr 2019 08:49:16 +0000 (01:49 -0700)
committerLuis Gomez <ecelgp@gmail.com>
Thu, 11 Apr 2019 16:54:56 +0000 (09:54 -0700)
During MRI window we figured out it could be useful to have some
projects executing normal build when fast build (-Pq) is true.

Change-Id: I5a29b460e5a7b487a319a1d6b79a364b0a13fde3
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
jjb/integration/integration-test-jobs.yaml
jjb/integration/multipatch-distribution.sh
jjb/releng-macros.yaml

index 0be42e844daaa83da341124fb2009c04d7fbb2b7..2bb4292851d0042f95dc60ae4c0a668991298432 100644 (file)
           build-days-to-keep: '{build-days-to-keep}'
 
     parameters:
-      - patches-to-build-parameter:
-          patches_to_build: '$PATCHES_TO_BUILD'
-      - build-order-parameter:
-          build-order: '{build-order}'
-      - build-fast-parameter:
-          build-fast: 'false'
-      - run-test-parameter:
-          run-test: 'false'
+      - string:
+          name: PATCHES_TO_BUILD
+          default: '$PATCHES_TO_BUILD'
+          description: |
+              Ordered list of patches to build in the format of project=changeset (checkout) or
+              project:changeset (cherry-pick) for example: genius=32/53632/9,netvirt:59/50259/47.
+      - string:
+          name: BUILD_ORDER
+          default: '{build-order}'
+          description: 'Build order for multipatch test when topic is used'
+      - string:
+          name: BUILD_FAST
+          default: 'true'
+          description: 'Set true to build fast -Pq'
+      - string:
+          name: BUILD_NORMAL
+          default: ''
+          description: 'List of projects to build normal (no -Pq) when BUILD_FAST=true'
+      - string:
+          name: RUN_TEST
+          default: 'false'
+          description: 'Set true to run test after build'
       - integration-distribution-branch:
           branch: '{branch}'
       - integration-distribution-stream:
index d02a42421a0cd204232277968b39018aaba4c8a4..87dd099f63e26d5ad5e03029656727dd09b5ffac 100755 (executable)
@@ -37,11 +37,6 @@ if [ -n "$GERRIT_EVENT_COMMENT_TEXT" ]; then
     fi
     PATCHES_TO_BUILD=${PATCHES_TO_BUILD#*:}
 fi
-if ${BUILD_FAST}; then
-    fast_option="-Pq"
-else
-    fast_option=""
-fi
 # check if topic exists:
 # if topic=binding-rpc, then checkout first patch in binding-rpc topic (if it exists)
 # if topic:binding-rpc, then cherry-pick first patch in binding-rpc topic (if it exists)
@@ -205,6 +200,12 @@ fi
 # Second phase: build everything
 
 for PROJECT_SHORTNAME in "${PROJECTS[@]}"; do
+    # Set Fast build if project is not in BUILD_NORMAL and BUILD_FAST is true
+    if [[ "${BUILD_NORMAL}" != *"${PROJECT_SHORTNAME}"* ]] && ${BUILD_FAST}; then
+        fast_option="-Pq"
+    else
+        fast_option=""
+    fi
     pushd "${PROJECT_SHORTNAME}"
     # Build project
     "$MVN" clean install \
index 7c0a9164318df0009cc234580f8e560e593c383e..e106e25599771e2f16ddef198f5ba0c298292aba 100644 (file)
               further details.
               https://docs.openstack.org/developer/python-openstackclient/
 
-- parameter:
-    name: patches-to-build-parameter
-    parameters:
-      - string:
-          name: PATCHES_TO_BUILD
-          default: ''
-          description: |
-              Ordered list of patches to build in the format of project=changeset (checkout) or
-              project:changeset (cherry-pick) for example: genius=32/53632/9,netvirt:59/50259/47.
-              A topic is also allowed, for example: topic=binding-tlc-rpc
-
-- parameter:
-    name: build-order-parameter
-    parameters:
-      - string:
-          name: BUILD_ORDER
-          default: '{build-order}'
-          description: 'Build order for multipatch test when topic is used'
-
-- parameter:
-    name: build-fast-parameter
-    parameters:
-      - string:
-          name: BUILD_FAST
-          default: '{build-fast}'
-          description: 'Set true to build fast -Pq'
-
-- parameter:
-    name: run-test-parameter
-    parameters:
-      - string:
-          name: RUN_TEST
-          default: '{run-test}'
-          description: 'Set true to run test after build'
-
 - parameter:
     name: distribution-branch-to-build-parameter
     parameters: