From: Luis Gomez Date: Fri, 27 Apr 2018 02:11:45 +0000 (-0700) Subject: RELENG-103: Make -Pq configurable in multipatch X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=81e62e23542e53697bc62cf982703f0256404cec;p=releng%2Fbuilder.git RELENG-103: Make -Pq configurable in multipatch Default is to build normally, for fast build: - If trigger from gerrit, use multipatch-build-fast: - If trigger manually, set BUILD_FAST parameter to true Change-Id: I51841a9c8b61c80c31b738d58d93b344d5da8e82 Signed-off-by: Luis Gomez --- diff --git a/docs/jenkins.rst b/docs/jenkins.rst index 8ada1c7e6..93c5bdf6e 100644 --- a/docs/jenkins.rst +++ b/docs/jenkins.rst @@ -805,6 +805,7 @@ TODO: Document test-{project}-{feature} and test-{project}-all. cherry-pick 59/60259/17 and build netvirt, finally it will checkout latest distribution code and build a distribution. The resulting distribution is stored in Nexus and the URL is stored in a variable called BUNDLE_URL visible in the job console. + Use multipatch-build-fast (vs multipatch-build) for building projects fast (-Pq). This job should not alter Gerrit votes for a given patch, nor will do anything with the given patch unless the patch is added to the build list. diff --git a/jjb/integration/integration-test-jobs.yaml b/jjb/integration/integration-test-jobs.yaml index 97d882d1c..1b0410be3 100644 --- a/jjb/integration/integration-test-jobs.yaml +++ b/jjb/integration/integration-test-jobs.yaml @@ -254,7 +254,7 @@ # (if not all) available CSIT jobs. project-type: freestyle - node: centos7-builder-4c-4g + node: centos7-builder-8c-8g jdk: '{java-version}' properties: @@ -266,6 +266,8 @@ patches_to_build: '$PATCHES_TO_BUILD' - run-test-parameter: run-test: 'false' + - build-fast-parameter: + build-fast: 'false' - integration-distribution-branch: branch: '{branch}' - integration-distribution-stream: @@ -290,7 +292,7 @@ server-name: '{gerrit-server-name}' trigger-on: - comment-added-contains-event: - comment-contains-value: 'multipatch-build:' + comment-contains-value: 'multipatch-build' projects: - project-compare-type: ANT project-pattern: '**' @@ -310,7 +312,7 @@ dist-pom: patch_tester/distribution/pom.xml - conditional-step: condition-kind: boolean-expression - condition-expression: $RUNTEST + condition-expression: $RUN_TEST steps: - trigger-builds: - project: '{csit-list}' diff --git a/jjb/integration/multipatch-distribution.sh b/jjb/integration/multipatch-distribution.sh index ce0fcb4f7..110e3f573 100644 --- a/jjb/integration/multipatch-distribution.sh +++ b/jjb/integration/multipatch-distribution.sh @@ -29,10 +29,20 @@ export GIT_COMMITTER_NAME="Multipatch Job" # # multipatch-build:openflowplugin:45/69445/1,genius:46/69446/1,netvirt:47/69447/1 if [ -n "$GERRIT_EVENT_COMMENT_TEXT" ]; then - # Grep the multipatch-build: line and then strip from the beginning to the : - PATCHES_TO_BUILD=$(echo "$GERRIT_EVENT_COMMENT_TEXT" | grep 'multipatch-build:') + if [[ "$GERRIT_EVENT_COMMENT_TEXT" == *fast* ]]; then + BUILD_FAST="true" + PATCHES_TO_BUILD=$(echo "$GERRIT_EVENT_COMMENT_TEXT" | grep 'multipatch-build-fast:') + else + BUILD_FAST="false" + PATCHES_TO_BUILD=$(echo "$GERRIT_EVENT_COMMENT_TEXT" | grep 'multipatch-build:') + fi PATCHES_TO_BUILD=${PATCHES_TO_BUILD#*:} fi +if ${BUILD_FAST}; then + fast_option="-Pq" +else + fast_option="" +fi IFS=',' read -ra PATCHES <<< "${PATCHES_TO_BUILD}" # For each patch: @@ -100,7 +110,7 @@ do fi # Build project "$MVN" clean install \ - -e -Pq \ + -e ${fast_option} \ -Dstream=oxygen \ -Dgitid.skip=false \ -Dmaven.gitcommitid.skip=false \ diff --git a/jjb/releng-macros.yaml b/jjb/releng-macros.yaml index f34d5aa7e..f57959410 100644 --- a/jjb/releng-macros.yaml +++ b/jjb/releng-macros.yaml @@ -89,10 +89,18 @@ name: run-test-parameter parameters: - string: - name: RUNTEST + name: RUN_TEST default: '{run-test}' description: 'Set true to run test after build' +- parameter: + name: build-fast-parameter + parameters: + - string: + name: BUILD_FAST + default: '{build-fast}' + description: 'Set true to build fast -Pq' + - parameter: name: distribution-branch-to-build-parameter parameters: