summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-01-08 16:17:30 +0000
committerGerrit Code Review <review@openstack.org>2019-01-08 16:17:30 +0000
commit5bdefb7d13b2d2118c395ad8f7b892e900db6432 (patch)
treed7df3f6c47e49547283321670ae835d2a85c8822
parentff338dc948d5fec0ba7c3ced1f3630e00890b426 (diff)
parentbc55a673a075de6983b37a9150e05cfca99b5ab3 (diff)
Merge "Do not ignore global-settings-type in Maven module"
-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