From b0be7b7e49768419a3fe4c23f9dc32e257cccc64 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Wed, 12 Apr 2017 21:20:44 -0400 Subject: [PATCH] Make integration-patch-test deploy to Nexus This patch converts the integration-patch-test job from a Maven project to a freestyle project type and then reconfigures it to push the distribution it builds to Nexus. Finally storing BUNDLE_URL as a variable to be passed to downstream projects so that they can build against it. Issue: RELENG-11 Change-Id: I5faabe5ac31d1b61edd0ba8b551df8cdb778e7be Signed-off-by: Thanh Ha --- .../include-raw-integration-get-bundle-url.sh | 12 ----- jjb/integration/integration-macros.yaml | 13 ----- jjb/integration/integration-test-jobs.yaml | 49 +++++++++---------- 3 files changed, 23 insertions(+), 51 deletions(-) delete mode 100644 jjb/integration/include-raw-integration-get-bundle-url.sh diff --git a/jjb/integration/include-raw-integration-get-bundle-url.sh b/jjb/integration/include-raw-integration-get-bundle-url.sh deleted file mode 100644 index f366a0c3e..000000000 --- a/jjb/integration/include-raw-integration-get-bundle-url.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# Extract the BUNDLE_VERSION from the pom.xml -export BUNDLE_URL -export BUNDLE_VERSION -BUNDLE_VERSION=$(xpath "$BUNDLE_POM" '/project/version/text()' 2> /dev/null) -BUNDLE_URL=${BUILD_URL}org.opendaylight.integration\$distribution-karaf/artifact/org.opendaylight.integration/distribution-karaf/${BUNDLE_VERSION}/distribution-karaf-${BUNDLE_VERSION}.zip - -echo "Bundle variables" -env | grep BUNDLE_ | sort | tee -a bundle.txt - -# NOTE: BUNDLE_VERSION & BUNDLE_URL will be re-imported back into the environment with the -# Inject environment variables plugin (next step) diff --git a/jjb/integration/integration-macros.yaml b/jjb/integration/integration-macros.yaml index b9367e2f8..d7204ed8f 100644 --- a/jjb/integration/integration-macros.yaml +++ b/jjb/integration/integration-macros.yaml @@ -322,19 +322,6 @@ builders: - shell: !include-raw: include-raw-integration-start-cluster-run-test.sh -# Macro: integration-get-bundle-url -# Operation: this macro gets the job generated distribution URL from distribution pom.xml -# Used by: integration-patch-test-{stream} job template - -- builder: - name: integration-get-bundle-url - builders: - - inject: - properties-content: BUNDLE_POM={bundle-pom} - - shell: !include-raw-escape: include-raw-integration-get-bundle-url.sh - - inject: - properties-file: bundle.txt - # Macro: integration-install-robotframework # Operation: Installs robotframework using pip to a virtualenv # Used by: {project}-csit-* job templates diff --git a/jjb/integration/integration-test-jobs.yaml b/jjb/integration/integration-test-jobs.yaml index cca55e101..a205e69d6 100644 --- a/jjb/integration/integration-test-jobs.yaml +++ b/jjb/integration/integration-test-jobs.yaml @@ -230,7 +230,7 @@ - job-template: name: 'integration-patch-test-{stream}' - project-type: maven + project-type: freestyle node: centos7-java-builder-2c-8g jdk: '{jdk}' @@ -249,6 +249,8 @@ branch: '{branch}' - integration-distribution-git-url: git-url: '{git-url}' + - maven-exec: + maven-version: mvn33 scm: - integration-gerrit-scm: @@ -280,10 +282,8 @@ unstable: true notbuilt: true - prebuilders: + builders: - integration-rebase-gerrit-patch - - integration-get-bundle-url: - bundle-pom: distribution/pom.xml - wipe-org-opendaylight-repo - provide-maven-settings: global-settings-file: 'odl-global-settings' @@ -291,34 +291,31 @@ - maven-target: maven-version: 'mvn33' pom: '$GERRIT_PROJECT/pom.xml' - goals: > + goals: | clean install dependency:tree -DoutputFile=dependency_tree.txt - -V -B -Pq -Djenkins - -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r + -Pq -Dstream={stream} + {opendaylight-infra-mvn-opts} java-opts: - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true' - settings: 'integration-settings' + settings: integration-settings settings-type: cfp - global-settings: 'odl-global-settings' + global-settings: odl-global-settings global-settings-type: cfp - - maven: - maven-name: 'mvn33' - root-pom: 'distribution/pom.xml' - goals: > - clean install dependency:tree -DoutputFile=dependency_tree.txt - -V -B -Djenkins - -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r - maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true' - settings: 'integration-settings' - settings-type: cfp - global-settings: 'odl-global-settings' - global-settings-type: cfp - ignore-upstream-changes: true - post-step-run-condition: 'SUCCESS' - - postbuilders: + - maven-target: + maven-version: mvn33 + pom: distribution/pom.xml + goals: | + clean install dependency:tree -DoutputFile=dependency_tree.txt + {opendaylight-infra-mvn-opts} + java-opts: + - '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true' + settings: integration-settings + settings-type: cfp + global-settings: odl-global-settings + global-settings-type: cfp + - distribution-check-deploy-distribution: + dist-pom: distribution/pom.xml - trigger-builds: - project: '{csit-list}' block: true -- 2.36.6