-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpipeline.j2
94 lines (94 loc) · 4.71 KB
/
pipeline.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{% if build is not defined -%}
{% set build = {'properties':{}} -%}
{% endif -%}
{% if triggers is not defined -%}
{% set triggers = {} -%}
{% endif -%}
<?xml version='1.1' encoding='UTF-8'?>
<flow-definition plugin="[email protected]">
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties>
<jenkins.model.BuildDiscarderProperty>
<strategy class="hudson.tasks.LogRotator">
<daysToKeep>{{ build.properties.days_to_keep|default(-1, true) }}</daysToKeep>
<numToKeep>{{ build.properties.num_to_keep|default(5, true) }}</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>5</artifactNumToKeep>
</strategy>
</jenkins.model.BuildDiscarderProperty>
{% if build.disable_concurrent is sameas true -%}
<org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty/>
{% endif -%}
<com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty plugin="[email protected]">
<gitLabConnection></gitLabConnection>
</com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty>
{% if build.parameters is defined -%}
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
{% for param in build.parameters -%}
<hudson.model.StringParameterDefinition>
<name>{{ param.name }}</name>
<description>{{ param.description|default('Do not edit manually', true) }}</description>
<defaultValue>{{ param.value }}</defaultValue>
<trim>true</trim>
</hudson.model.StringParameterDefinition>
{% endfor -%}
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
{% endif -%}
<org.jenkinsci.plugins.workflow.job.properties.DurabilityHintJobProperty>
<hint>{{ pipeline_strategy|default('PERFORMANCE_OPTIMIZED', true) }}</hint>
</org.jenkinsci.plugins.workflow.job.properties.DurabilityHintJobProperty>
<org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
<triggers>
<com.dabsquared.gitlabjenkins.GitLabPushTrigger plugin="[email protected]">
<spec></spec>
<triggerOnPush>{{ triggers.on_push|default('false', true) }}</triggerOnPush>
<triggerOnMergeRequest>{{ triggers.on_merge_request|default('false', true) }}</triggerOnMergeRequest>
<triggerOnPipelineEvent>false</triggerOnPipelineEvent>
<triggerOnAcceptedMergeRequest>{{ triggers.on_merge_accept|default('false', true) }}</triggerOnAcceptedMergeRequest>
<triggerOnClosedMergeRequest>{{ triggers.on_merge_close|default('false', true) }}</triggerOnClosedMergeRequest>
<triggerOnApprovedMergeRequest>{{ triggers.on_merge_approve|default('false', true) }}</triggerOnApprovedMergeRequest>
<triggerOpenMergeRequestOnPush>{{ triggers.on_open_merge_on_push|default('false', true) }}</triggerOpenMergeRequestOnPush>
<triggerOnNoteRequest>{{ triggers.on_note_request|default('false', true) }}</triggerOnNoteRequest>
<noteRegex>{{ triggers.note_regex|default('', true) }}</noteRegex>
<ciSkip>true</ciSkip>
<skipWorkInProgressMergeRequest>true</skipWorkInProgressMergeRequest>
<setBuildDescription>true</setBuildDescription>
<branchFilterType>All</branchFilterType>
<includeBranchesSpec></includeBranchesSpec>
<excludeBranchesSpec></excludeBranchesSpec>
<sourceBranchRegex></sourceBranchRegex>
<targetBranchRegex></targetBranchRegex>
<pendingBuildName></pendingBuildName>
<cancelPendingBuildsOnUpdate>false</cancelPendingBuildsOnUpdate>
</com.dabsquared.gitlabjenkins.GitLabPushTrigger>
</triggers>
</org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
</properties>
<definition class="org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition" plugin="[email protected]">
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>{{ pipeline.git_url }}</url>
<credentialsId>{{ pipeline.creds_id }}</credentialsId>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>{{ pipeline.branch }}</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="list"/>
<extensions/>
</scm>
<scriptPath>{{ pipeline.script_path }}</scriptPath>
<lightweight>true</lightweight>
</definition>
<triggers/>
<disabled>false</disabled>
</flow-definition>