Make integration-multipatch-test deploy to Nexus 17/54917/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 13 Apr 2017 01:39:10 +0000 (21:39 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 13 Apr 2017 02:08:28 +0000 (22:08 -0400)
This patch converts the integration-multipatch-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: I62b666e21d3897e2c1ae4ccb7a21d6ff17976604
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/integration/include-raw-integration-multipatch-distribution-test.sh
jjb/integration/integration-test-jobs.yaml

index bf1ce351f1f04da29d4f6bf7fd9efb0d129d1f26..8137a6603c93d6a7ee34270b63347dd41da48677 100644 (file)
@@ -86,14 +86,3 @@ fi
 # finish pom file
 echo "</modules>" >> ${POM_FILE}
 echo "</project>" >> ${POM_FILE}
-
-# Extract the BUNDLEVERSION from the distribution pom.xml
-BUNDLEVERSION=`xpath $BUILD_DIR/distribution/pom.xml '/project/version/text()' 2> /dev/null`
-echo "Bundle version is ${BUNDLEVERSION}"
-
-BUNDLEURL=${BUILD_URL}org.opendaylight.integration\$distribution-karaf/artifact/org.opendaylight.integration/distribution-karaf/${BUNDLEVERSION}/distribution-karaf-${BUNDLEVERSION}.zip
-echo "Bundle url is ${BUNDLEURL}"
-
-# Set BUNDLEVERSION & BUNDLEURL
-echo BUNDLEVERSION=${BUNDLEVERSION} > ${WORKSPACE}/bundle.txt
-echo BUNDLEURL=${BUNDLEURL} >> ${WORKSPACE}/bundle.txt
index a205e69d688f22a493d93bd52a250fa8cf1ce3b9..b178bffeb8d1488a84e2999b12f01ceb2d3a7940 100644 (file)
     #     so you do not have to wait for multipatch build. Repeat step 12.
     # 13. Currently, the .zip lasts 24 hours (?) so you may need to jump to step 2 (or 0) after some time.
 
-    project-type: maven
+    project-type: freestyle
     node: centos7-java-builder-8c-8g
     jdk: '{jdk}'
 
           branch: '{branch}'
           refspec: 'refs/heads/{branch}'
           artifacts: '{archive-artifacts} **/dependency_tree.txt'
+      - maven-exec:
+          maven-version: mvn33
+
+    wrappers:
+      - opendaylight-infra-wrappers:
+          build-timeout: '1200'
 
-    prebuilders:
+    builders:
       - wipe-org-opendaylight-repo
       - integration-multipatch-builder
-      - inject:
-          properties-file: 'bundle.txt'
       - provide-maven-settings:
           global-settings-file: 'odl-global-settings'
           settings-file: 'yangtools-settings'
-
-    wrappers:
-      - opendaylight-infra-wrappers:
-          build-timeout: '1200'
-
-    maven:
-      maven-name: 'mvn33'
-      root-pom: 'patch_tester/pom.xml'
-      # TODO: Make Maven options configurable. Currently tests are not skipped, everything else is.
-      goals: >
-          clean install dependency:tree -DoutputFile=dependency_tree.txt
-          -f patch_tester/pom.xml -V -B -Pq -Djenkins
-          -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
-          -Dstream={stream}
-      maven-opts: '-Xmx7168m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
-      settings: 'yangtools-settings'
-      settings-type: cfp
-      global-settings: 'odl-global-settings'
-      global-settings-type: cfp
-      post-step-run-condition: 'SUCCESS'
-
-    postbuilders:
+      - maven-target:
+          maven-version: mvn33
+          pom: patch_tester/pom.xml
+          # TODO: Make Maven options configurable. Currently tests are not skipped, everything else is.
+          goals: |
+              clean install dependency:tree -DoutputFile=dependency_tree.txt
+              -Pq
+              -Dstream={stream}
+              {opendaylight-infra-mvn-opts}
+          java-opts:
+            - '-Xmx7168m -XX:MaxPermSize=1024m -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: patch_tester/distribution/pom.xml
       - conditional-step:
           condition-kind: boolean-expression
           condition-expression: $RUNTEST
                 - project: '{csit-list}'
                   block: true
                   predefined-parameters:
-                    BUNDLEURL=$BUNDLEURL
+                    BUNDLEURL=$BUNDLE_URL
 
     publishers:
       - opendaylight-infra-shiplogs: