diff options
author | 2017-02-24 12:51:11 -0800 | |
---|---|---|
committer | 2017-02-24 12:51:11 -0800 | |
commit | 3aaa7d49cbae59e14cedc26f09c7f2b216725cfe (patch) | |
tree | 7a8cbb61b7fa7d3484d1861f4d8d859785bb7f36 /jjb | |
parent | e24658853e35cb730c21dd85e68b532aa0a88073 (diff) |
Force maven to install in java jobs using scripts
The *version2* java jobs execute scripts that need ${MVN} to actually
operate properly. As these scripts are happening before the standard
maven build step maven is not installed yet. Ergo, we need an empty
maven build step that makes sure that it's installed.
Change-Id: I5a0979fdffa87f695b1bc575e24b04097889ea59
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/global-macros.yaml | 9 | ||||
-rw-r--r-- | jjb/global-templates-java.yaml | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml index 2d2d6c3e6..46c4d827f 100644 --- a/jjb/global-macros.yaml +++ b/jjb/global-macros.yaml @@ -20,6 +20,15 @@ - file-id: '{settings-file}' variable: 'SETTINGS_FILE' +# call maven-target builder with a goal of --version to force Jenkins to +# install the needed maven version +- builder: + name: maven-install + builders: + - maven-target: + maven-version: '{maven-version}' + goals: '--version' + - builder: name: maven-docker-push-release builders: diff --git a/jjb/global-templates-java.yaml b/jjb/global-templates-java.yaml index 4423d2072..7147a2081 100644 --- a/jjb/global-templates-java.yaml +++ b/jjb/global-templates-java.yaml @@ -788,6 +788,7 @@ - provide-maven-settings: global-settings-file: 'global-settings' settings-file: '{mvn-settings}' + - maven-install - inject: properties-file: version.properties @@ -862,6 +863,7 @@ - provide-maven-settings: global-settings-file: 'global-settings' settings-file: '{mvn-settings}' + - maven-install - inject: properties-file: version.properties |