Consolidate mvn-version as done in global-jjb 93/78193/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 27 Nov 2018 08:14:56 +0000 (16:14 +0800)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 27 Nov 2018 17:52:00 +0000 (01:52 +0800)
Follow global-jjb best practices.

Change-Id: I403443f23c241e1e86bd25cc219d11777d688b00
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/autorelease/autorelease-templates.yaml

index cb9ae1b1cde530669bc4ac667c29c21133f0f382..151e3a3c71701abbf86f7d6639b685760c1964b5 100644 (file)
 
     mvn-global-settings: global-settings
     mvn-settings: autorelease-settings
+    mvn-version: mvn35
 
     #####################
     # Job configuration #
               and artifacts are not pushed to Nexus. Instead the build will be
               performed using the goals "clean install".
       - maven-exec:
-          maven-version: mvn35
+          maven-version: '{mvn-version}'
 
     scm:
       - lf-infra-gerrit-scm:
       - lf-infra-pre-build
       # force jenkins install of maven version before any shell scripts use it
       - lf-maven-install:
-          mvn-version: mvn35
+          mvn-version: '{mvn-version}'
       - lf-provide-maven-settings:
           global-settings-file: '{mvn-global-settings}'
           settings-file: '{mvn-settings}'
 - job-template:
     name: '{project-name}-validate-autorelease-{stream}'
 
-    ############
-    # Defaults #
-    ############
+    #####################
+    # Default variables #
+    #####################
 
     java-version: openjdk8
     mvn-global-settings: global-settings
     mvn-settings: autorelease-settings
+    mvn-version: mvn35
 
     #####################
     # Job Configuration #
       # to enable building in a single maven reactor afterwards.
       - autorelease-fix-relative-paths
       - maven-target:
-          maven-version: mvn35
+          maven-version: '{mvn-version}'
           pom: validate-pom.xml
           goals: |
               clean install dependency:tree
           global-settings: '{mvn-global-settings}'
           global-settings-type: cfp
       - maven-target:
-          maven-version: mvn35
+          maven-version: '{mvn-version}'
           pom: pom.xml
           goals: |
               clean validate