X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb%2Flf-maven-jobs.yaml;h=cd3172b16507cc0e0e430efb44f4d99b49e834e1;hb=c4295ab63bdbbceb6647b86ae27732364c2bce26;hp=988eebd2549189f06db6bc84627be873ea29ce60;hpb=d33f3cbda58449a245ab383cc566f11429d5f079;p=releng%2Fglobal-jjb.git diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index 988eebd2..cd3172b1 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -52,6 +52,15 @@ # Macros # ########## +- builder: + name: lf-maven-build + builders: + - inject: + properties-content: 'MAVEN_GOALS={mvn-goals}' + - shell: !include-raw-escape: + - ../shell/common-variables.sh + - ../shell/maven-build.sh + - builder: name: lf-maven-deploy builders: @@ -59,6 +68,23 @@ - ../shell/common-variables.sh - ../shell/maven-deploy.sh +- builder: + name: lf-maven-stage + builders: + # include-raw-escape fails due to JJB bug + - shell: !include-raw: + - ../shell/common-variables.sh + - ../shell/maven-stage.sh + +- builder: + name: lf-update-java-alternatives + builders: + - inject: + properties-content: 'SET_JDK_VERSION={java-version}' + - shell: !include-raw-escape: ../shell/update-java-alternatives.sh + - inject: + properties-file: '/tmp/java.env' + #################### # COMMON FUNCTIONS # #################### @@ -170,6 +196,8 @@ builders: - lf-maven-install: mvn-version: '{mvn-version}' + - lf-update-java-alternatives: + java-version: '{java-version}' - lf-provide-maven-settings: global-settings-file: '{mvn-global-settings}' settings-file: '{mvn-settings}' @@ -266,6 +294,8 @@ builders: - lf-maven-install: mvn-version: '{mvn-version}' + - lf-update-java-alternatives: + java-version: '{java-version}' - lf-provide-maven-settings: global-settings-file: '{mvn-global-settings}' settings-file: '{mvn-settings}' @@ -385,6 +415,8 @@ builders: - lf-maven-install: mvn-version: '{mvn-version}' + - lf-update-java-alternatives: + java-version: '{java-version}' - lf-provide-maven-settings: global-settings-file: '{mvn-global-settings}' settings-file: '{mvn-settings}' @@ -471,6 +503,7 @@ git-url: '$GIT_URL/$PROJECT' java-version: openjdk8 mvn-global-settings: global-settings + mvn-goals: clean deploy mvn-opts: '' mvn-params: '-Dmerge' mvn-version: mvn33 @@ -498,6 +531,8 @@ - lf-jacoco-nojava-workaround - lf-maven-install: mvn-version: '{mvn-version}' + - lf-update-java-alternatives: + java-version: '{java-version}' - lf-provide-maven-settings: global-settings-file: '{mvn-global-settings}' settings-file: '{mvn-settings}' @@ -509,9 +544,9 @@ NEXUS_REPO={nexus-snapshot-repo} - shell: !include-raw-escape: - ../shell/lftools-install.sh - - ../shell/common-variables.sh - ../shell/maven-fetch-metadata.sh - - ../shell/maven-build.sh + - lf-maven-build: + mvn-goals: '{mvn-goals}' - lf-maven-deploy - lf-provide-maven-settings-cleanup @@ -601,6 +636,7 @@ git-url: '$GIT_URL/$PROJECT' java-version: openjdk8 mvn-global-settings: global-settings + mvn-goals: clean deploy mvn-opts: '' mvn-params: '' mvn-version: mvn33 @@ -619,6 +655,8 @@ - lf-jacoco-nojava-workaround - lf-maven-install: mvn-version: '{mvn-version}' + - lf-update-java-alternatives: + java-version: '{java-version}' - lf-provide-maven-settings: global-settings-file: '{mvn-global-settings}' settings-file: '{mvn-settings}' @@ -626,10 +664,10 @@ server-id: '{mvn-staging-id}' - shell: !include-raw-escape: - ../shell/lftools-install.sh - - ../shell/common-variables.sh - ../shell/maven-patch-release.sh - - ../shell/maven-build.sh - - ../shell/maven-stage.sh + - lf-maven-build: + mvn-goals: '{mvn-goals}' + - lf-maven-stage - lf-provide-maven-settings-cleanup - job-template: @@ -771,6 +809,7 @@ builders: - lf-infra-maven-sonar: + java-version: '{java-version}' mvn-settings: '{mvn-settings}' mvn-version: '{mvn-version}' @@ -785,6 +824,8 @@ builders: - lf-maven-install: mvn-version: '{mvn-version}' + - lf-update-java-alternatives: + java-version: '{java-version}' - inject: # Switch this to the sonar wrapper when JJB 2.0 is available properties-content: SONAR_HOST_URL=$SONAR_URL @@ -862,6 +903,7 @@ git-url: '$GIT_URL/$PROJECT' java-version: openjdk8 mvn-global-settings: global-settings + mvn-goals: clean deploy mvn-opts: '' mvn-params: '-Dstream=$STREAM' mvn-version: mvn33 @@ -891,13 +933,15 @@ - lf-jacoco-nojava-workaround - lf-maven-install: mvn-version: '{mvn-version}' + - lf-update-java-alternatives: + java-version: '{java-version}' - lf-provide-maven-settings: global-settings-file: '{mvn-global-settings}' settings-file: '{mvn-settings}' - shell: !include-raw-escape: - ../shell/lftools-install.sh - - ../shell/common-variables.sh - - ../shell/maven-build.sh + - lf-maven-build: + mvn-goals: '{mvn-goals}' - lf-provide-maven-settings-cleanup publishers: @@ -983,6 +1027,7 @@ git-url: '$GIT_URL/$PROJECT' java-version: openjdk8 mvn-global-settings: global-settings + mvn-goals: clean deploy mvn-opts: '' mvn-params: '-Dstream=$STREAM' mvn-version: mvn33 @@ -1007,6 +1052,8 @@ - lf-jacoco-nojava-workaround - lf-maven-install: mvn-version: '{mvn-version}' + - lf-update-java-alternatives: + java-version: '{java-version}' - lf-provide-maven-settings: global-settings-file: '{mvn-global-settings}' settings-file: '{mvn-settings}' @@ -1014,9 +1061,8 @@ - shell: !include-raw-escape: - ../shell/common-variables.sh - ../shell/maven-build-deps.sh - - shell: !include-raw-escape: - - ../shell/common-variables.sh - - ../shell/maven-build.sh + - lf-maven-build: + mvn-goals: '{mvn-goals}' - lf-provide-maven-settings-cleanup publishers: