summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykola Nikishov <mn@mn.com.ua>2019-01-04 20:13:37 +0200
committerMykola Nikishov <mn@mn.com.ua>2019-01-04 23:58:20 +0200
commitbc55a673a075de6983b37a9150e05cfca99b5ab3 (patch)
tree75cafa3ffc0162e14f04adc46008b63deea48eed
parentb1499530dbb5ad66f52fbfc4ffa1343da79df441 (diff)
Do not ignore global-settings-type in Maven module
settings-type parameter hides global-settings-type and makes it impossible to use settings from the file and ConfigFileProvider at the same time like: maven: settings-type: file settings: mvn/settings.xml global-settings-type: cfp global-settings: test Change-Id: Ieda05912ae8b28942d98150a51c92b2521f2b6bf Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
Notes
Notes (review): Code-Review+2: Thanh Ha (zxiiro) <zxiiro@gmail.com> Code-Review+2: Sorin Sbarnea <ssbarnea@redhat.com> Workflow+1: Sorin Sbarnea <ssbarnea@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 08 Jan 2019 16:17:30 +0000 Reviewed-on: https://review.openstack.org/628693 Project: openstack-infra/jenkins-job-builder Branch: refs/heads/master
-rw-r--r--jenkins_jobs/modules/helpers.py2
-rw-r--r--tests/general/fixtures/project-maven-global-settings-type.xml33
-rw-r--r--tests/general/fixtures/project-maven-global-settings-type.yaml7
3 files changed, 41 insertions, 1 deletions
diff --git a/jenkins_jobs/modules/helpers.py b/jenkins_jobs/modules/helpers.py
index 2867120..d4bea4c 100644
--- a/jenkins_jobs/modules/helpers.py
+++ b/jenkins_jobs/modules/helpers.py
@@ -155,7 +155,7 @@ def config_file_provider_settings(xml_parent, data):
155 if 'global-settings' in data: 155 if 'global-settings' in data:
156 # Support for Config File Provider 156 # Support for Config File Provider
157 global_settings_file = str(data['global-settings']) 157 global_settings_file = str(data['global-settings'])
158 global_settings_type = data.get('settings-type', 'file') 158 global_settings_type = data.get('global-settings-type', 'file')
159 159
160 # For cfp versions <2.10.0 we are able to detect cfp via the config 160 # For cfp versions <2.10.0 we are able to detect cfp via the config
161 # settings name. 161 # settings name.
diff --git a/tests/general/fixtures/project-maven-global-settings-type.xml b/tests/general/fixtures/project-maven-global-settings-type.xml
new file mode 100644
index 0000000..fb3fa50
--- /dev/null
+++ b/tests/general/fixtures/project-maven-global-settings-type.xml
@@ -0,0 +1,33 @@
1<?xml version="1.0" encoding="utf-8"?>
2<maven2-moduleset>
3 <goals>deploy</goals>
4 <ignoreUpstremChanges>true</ignoreUpstremChanges>
5 <rootPOM>pom.xml</rootPOM>
6 <aggregatorStyleBuild>true</aggregatorStyleBuild>
7 <incrementalBuild>false</incrementalBuild>
8 <siteArchivingDisabled>false</siteArchivingDisabled>
9 <fingerprintingDisabled>false</fingerprintingDisabled>
10 <archivingDisabled>false</archivingDisabled>
11 <resolveDependencies>false</resolveDependencies>
12 <processPlugins>false</processPlugins>
13 <mavenValidationLevel>-1</mavenValidationLevel>
14 <runHeadless>false</runHeadless>
15 <disableTriggerDownstreamProjects>false</disableTriggerDownstreamProjects>
16 <settings class="jenkins.mvn.FilePathSettingsProvider">
17 <path>test</path>
18 </settings>
19 <globalSettings class="org.jenkinsci.plugins.configfiles.maven.job.MvnGlobalSettingsProvider">
20 <settingsConfigId>test</settingsConfigId>
21 </globalSettings>
22 <runPostStepsIfResult>
23 <name>FAILURE</name>
24 <ordinal>2</ordinal>
25 <color>RED</color>
26 </runPostStepsIfResult>
27 <actions/>
28 <keepDependencies>false</keepDependencies>
29 <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
30 <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
31 <concurrentBuild>false</concurrentBuild>
32 <canRoam>true</canRoam>
33</maven2-moduleset>
diff --git a/tests/general/fixtures/project-maven-global-settings-type.yaml b/tests/general/fixtures/project-maven-global-settings-type.yaml
new file mode 100644
index 0000000..fc636ea
--- /dev/null
+++ b/tests/general/fixtures/project-maven-global-settings-type.yaml
@@ -0,0 +1,7 @@
1project-type: maven
2maven:
3 goals: deploy
4 settings-type: file
5 settings: test
6 global-settings-type: cfp
7 global-settings: test