Fix autorelease staging job 81/46481/4
authorAnil Belur <abelur@linuxfoundation.org>
Tue, 4 Oct 2016 13:33:30 +0000 (09:33 -0400)
committerAnil Belur <abelur@linuxfoundation.org>
Thu, 6 Oct 2016 17:27:45 +0000 (13:27 -0400)
Maven is not currently found due to freestyle job paths. Make sure
we create a job parameter that gives the path to the dynamically
installed maven and force maven install before it's used.

Change-Id: I8fe62746a17e5dfb2831d64742cb9fb856cf02b7
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
jjb/autorelease/autorelease-templates.yaml
jjb/autorelease/include-raw-autorelease-maven-deploy.sh
jjb/releng-macros.yaml

index e15c52799789520622bb93cedf8b55ffbd66e57f..00c93f3332d9f3c156fcbbdfd5daad8465c739ce 100644 (file)
@@ -12,6 +12,8 @@
         artifactDaysToKeep: '14'
 
     parameters:
+        - maven-exec:
+            maven-version: '{mvn33}'
         - opendaylight-infra-parameters:
             project: '{project}'
             branch: '{branch}'
         - timed: 'H 0 * * *'
 
     builders:
+        # force jenkins install of maven version before any shell scripts use it
+        - maven-target:
+            maven-version: '{mvn33}'
+            goals: '--version'
+            settings: 'autorelease-settings'
+            settings-type: cfp
+            global-settings: 'odl-global-settings'
+            global-settings-type: cfp
         - wipe-local-maven-repo
         - jacoco-nojava-workaround
         - shell: "./scripts/list-project-dependencies.sh"
index 23e606bb76ced63ee15dbab397ee151b718a9375..90861b94b94d84da91177bd22ec0dc08b778d923 100644 (file)
@@ -29,7 +29,7 @@ rsync -avz --exclude 'maven-metadata*' \
            --exclude 'resolver-status.properties' \
            "stage/org/opendaylight/integration" m2repo/org/opendaylight/
 
-mvn -V -B org.sonatype.plugins:nexus-staging-maven-plugin:1.6.2:deploy-staged-repository \
+"$MVN" -V -B org.sonatype.plugins:nexus-staging-maven-plugin:1.6.2:deploy-staged-repository \
     -DrepositoryDirectory="`pwd`/m2repo" \
     -DnexusUrl=https://nexus.opendaylight.org/ \
     -DstagingProfileId="425e43800fea70" \
index c6961aee37b78810c9f2a3618f83952473970fe3..32bd3c5f56492757a430d10d4b4444738a0e2a85 100644 (file)
             default: '{stage-id}'
             description: 'Nexus staging profile id'
 
+- parameter:
+    name: maven-exec
+    parameters:
+      - string:
+          name: MVN
+          default: '$HOME/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn'
+          description: 'Maven selector to be used by shell scripts'
+
 - scm:
     name: git-scm
     scm: