Merge "Maven project: allow to disable trigger downstream projects"

This commit is contained in:
Zuul 2018-02-27 18:15:02 +00:00 committed by Gerrit Code Review
commit fcd61f8ad6
6 changed files with 9 additions and 0 deletions

View File

@ -50,6 +50,8 @@ in the :ref:`Job` definition.
* **resolve-dependencies** (`bool`): Resolve Dependencies during Pom
parsing (default false).
* **run-headless** (`bool`): Run headless (default false).
* **disable-downstream** (`bool`): Disable triggering of downstream
projects (default false).
* **process-plugins** (`bool`): Process Plugins during Pom parsing
(default false).
* **custom-workspace** (`str`): Path to the custom workspace. If no path is
@ -164,6 +166,8 @@ class Maven(jenkins_jobs.modules.base.Base):
XML.SubElement(xml_parent, 'mavenValidationLevel').text = '-1'
XML.SubElement(xml_parent, 'runHeadless').text = str(
data['maven'].get('run-headless', False)).lower()
XML.SubElement(xml_parent, 'disableTriggerDownstreamProjects').text = \
str(data['maven'].get('disable-downstream', False)).lower()
if 'custom-workspace' in data['maven']:
XML.SubElement(xml_parent, 'customWorkspace').text = str(
data['maven'].get('custom-workspace'))

View File

@ -17,6 +17,7 @@
<processPlugins>true</processPlugins>
<mavenValidationLevel>-1</mavenValidationLevel>
<runHeadless>true</runHeadless>
<disableTriggerDownstreamProjects>true</disableTriggerDownstreamProjects>
<customWorkspace>path/to/some/repository</customWorkspace>
<settings class="jenkins.mvn.FilePathSettingsProvider">
<path>test</path>

View File

@ -14,4 +14,5 @@ maven:
resolve-dependencies: true
process-plugins: true
run-headless: true
disable-downstream: true
custom-workspace: path/to/some/repository

View File

@ -13,6 +13,7 @@
<processPlugins>false</processPlugins>
<mavenValidationLevel>-1</mavenValidationLevel>
<runHeadless>false</runHeadless>
<disableTriggerDownstreamProjects>false</disableTriggerDownstreamProjects>
<settings class="jenkins.mvn.DefaultSettingsProvider"/>
<globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
<runPostStepsIfResult>

View File

@ -12,6 +12,7 @@
<processPlugins>false</processPlugins>
<mavenValidationLevel>-1</mavenValidationLevel>
<runHeadless>false</runHeadless>
<disableTriggerDownstreamProjects>false</disableTriggerDownstreamProjects>
<settings class="org.jenkinsci.plugins.configfiles.maven.job.MvnSettingsProvider">
<settingsConfigId>org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig0123456789012</settingsConfigId>
</settings>

View File

@ -12,6 +12,7 @@
<processPlugins>false</processPlugins>
<mavenValidationLevel>-1</mavenValidationLevel>
<runHeadless>false</runHeadless>
<disableTriggerDownstreamProjects>false</disableTriggerDownstreamProjects>
<settings class="org.jenkinsci.plugins.configfiles.maven.job.MvnSettingsProvider">
<settingsConfigId>test-settings</settingsConfigId>
</settings>