| <actions/> |
| <description> |
| Salt generated project, do not edit. Changes will be overwritten. |
| {{ job.get('description', '')|e }} |
| </description> |
| {%- if job.display_name is defined %} |
| <displayName>{{ job.display_name }}</displayName> |
| {%- endif %} |
| <keepDependencies>false</keepDependencies> |
| <properties> |
| {%- if not job.concurrent|default(False) %} |
| <org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty/> |
| {%- endif %} |
| {%- if job.get('scm', {}).github is defined %} |
| <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github@1.21.1"> |
| <projectUrl>{{ job.scm.github.url }}</projectUrl> |
| <displayName>{{ job.scm.github.name|default("") }}</displayName> |
| </com.coravy.hudson.plugins.github.GithubProjectProperty> |
| {%- endif %} |
| <org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty> |
| <triggers> |
| {%- for type, trigger in job.get('trigger', {}).iteritems() %} |
| {%- if trigger.enabled|default(True) %} |
| {%- if type == 'reverse' %} |
| <jenkins.triggers.ReverseBuildTrigger> |
| <spec></spec> |
| <upstreamProjects>{{ trigger.projects|join(',') if trigger.projects is defined else trigger.project }}</upstreamProjects> |
| <threshold> |
| <name>{{ trigger.state|default('SUCCESS') }}</name> |
| <ordinal>{{ client.job_status.get(trigger.state|default('SUCCESS')).ordinal }}</ordinal> |
| <color>{{ client.job_status.get(trigger.state|default('SUCCESS')).color }}</color> |
| <completeBuild>{{ trigger.get('complete', True)|lower }}</completeBuild> |
| </threshold> |
| </jenkins.triggers.ReverseBuildTrigger> |
| {%- elif type == 'github' %} |
| <com.cloudbees.jenkins.GitHubPushTrigger plugin="github@1.21.1"> |
| <spec></spec> |
| </com.cloudbees.jenkins.GitHubPushTrigger> |
| {%- elif type == 'pollscm' %} |
| <hudson.triggers.SCMTrigger> |
| <spec>{{ trigger.spec }}</spec> |
| <ignorePostCommitHooks>false</ignorePostCommitHooks> |
| </hudson.triggers.SCMTrigger> |
| {%- elif type == 'gerrit' %} |
| <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger plugin="gerrit-trigger@2.23.0"> |
| <spec></spec> |
| <gerritProjects> |
| {%- for pname, project in trigger.project.iteritems() %} |
| <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject> |
| <compareType>{{ project.compare_type|default("PLAIN") }}</compareType> |
| <pattern>{{ project.name|default(pname) }}</pattern> |
| <branches> |
| {%- for branch in project.branches %} |
| <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch> |
| <compareType>PLAIN</compareType> |
| <pattern>{{ branch }}</pattern> |
| </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch> |
| {%- endfor %} |
| </branches> |
| </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject> |
| {%- endfor %} |
| </gerritProjects> |
| <skipVote> |
| <onSuccessful>{%- if "successful" in trigger.get('skip_vote',[]) %}true{%- else %}false{%- endif %}</onSuccessful> |
| <onFailed>{%- if "failed" in trigger.get('skip_vote',[]) %}true{%- else %}false{%- endif %}</onFailed> |
| <onUnstable>{%- if "unstable" in trigger.get('skip_vote',[]) %}true{%- else %}false{%- endif %}</onUnstable> |
| <onNotBuilt>{%- if "not_built" in trigger.get('skip_vote',[]) %}true{%- else %}false{%- endif %}</onNotBuilt> |
| </skipVote> |
| <silentMode>{{ trigger.get('silent_mode', False)|lower }}</silentMode> |
| <notificationLevel></notificationLevel> |
| <silentStartMode>{{ trigger.get('silent_start_mode', False)|lower }}</silentStartMode> |
| <escapeQuotes>true</escapeQuotes> |
| <nameAndEmailParameterMode>PLAIN</nameAndEmailParameterMode> |
| <dependencyJobsNames></dependencyJobsNames> |
| <commitMessageParameterMode>BASE64</commitMessageParameterMode> |
| <changeSubjectParameterMode>PLAIN</changeSubjectParameterMode> |
| <commentTextParameterMode>BASE64</commentTextParameterMode> |
| <buildStartMessage>{{ trigger.get('message', {}).build_start|default("") }}</buildStartMessage> |
| <buildFailureMessage>{{ trigger.get('message', {}).build_failure|default("") }}</buildFailureMessage> |
| <buildSuccessfulMessage>{{ trigger.get('message', {}).build_successful|default("") }}</buildSuccessfulMessage> |
| <buildUnstableMessage>{{ trigger.get('message', {}).build_unstable|default("") }}</buildUnstableMessage> |
| <buildNotBuiltMessage>{{ trigger.get('message', {}).build_not_built|default("") }}</buildNotBuiltMessage> |
| <buildUnsuccessfulFilepath>{{ trigger.get('message', {}).build_unsuccessful_filepath|default("") }}</buildUnsuccessfulFilepath> |
| <customUrl>{{ trigger.custom_url|default('') }}</customUrl> |
| <serverName>{{ trigger.server|default('__ANY__') }}</serverName> |
| <triggerOnEvents> |
| {%- for ename, actions in trigger.event.iteritems() %} |
| {%- for action in actions %} |
| {%- if action is mapping %} |
| {%- set action_name = action.keys().0 %} |
| {%- set action_param = action.values().0 %} |
| {%- else %} |
| {%- set action_name = action %} |
| {%- endif %} |
| |
| {%- set _name_list = [] %} |
| {%- for letter in action_name %} |
| {%- if loop.index == 1 %} |
| {%- do _name_list.append(letter|title) %} |
| {%- else %} |
| {%- do _name_list.append(letter) %} |
| {%- endif %} |
| {%- endfor %} |
| |
| {%- if action_param is defined %} |
| <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.Plugin{{ ename|title }}{{ _name_list|join('') }}Event> |
| {%- for key, value in action_param.iteritems() %} |
| <{{ key }}>{{ value }}</{{ key }}> |
| {%- endfor %} |
| </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.Plugin{{ ename|title }}{{ _name_list|join('') }}Event> |
| {%- else %} |
| <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.Plugin{{ ename|title }}{{ _name_list|join('') }}Event/> |
| {%- endif %} |
| {%- endfor %} |
| {%- endfor %} |
| </triggerOnEvents> |
| <dynamicTriggerConfiguration>false</dynamicTriggerConfiguration> |
| <triggerConfigURL></triggerConfigURL> |
| <triggerInformationAction/> |
| </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger> |
| {%- elif type == 'timer' %} |
| <hudson.triggers.TimerTrigger> |
| <spec>{{ trigger.spec }}</spec> |
| </hudson.triggers.TimerTrigger> |
| {%- endif %} |
| {%- endif %} |
| {%- endfor %} |
| </triggers> |
| </org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty> |
| {%- include "jenkins/files/jobs/_parameters.xml" %} |
| </properties> |
| <triggers> |
| </triggers> |
| {%- if job.quiet_period is defined %} |
| <quietPeriod>{{ job.quiet_period }}</quietPeriod> |
| {%- endif %} |
| {#- |
| vim: syntax=jinja sw=2 ts=2 |
| -#} |