jenkins_pipeline_builder 0.10.15 → 0.10.16
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MGExN2ExOTMzNjdkYzNlMTE2NzQ3Y2QyNjA1ODQ1MjEzNDllZjhmNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDUzNmFkYTUxNjViYTcwZDAxYzBlYTEzZTAyZDIyNTE1MjFjNmVmOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MmI3YzUzODJjYjIwZjkzNjI4ZjRmMzEwOGU2NDdhNjZjMGI4M2M4MzI3YmQ5
|
10
|
+
OWExYWZlYjNlYTJiMTRhYTY4MjQyNzZlOTZkN2JiYjg1NjE5YzIzYjYxYTRi
|
11
|
+
YTk1NzM2MTA0MzMwYzJiYzljYWFmNzU0ZjM3YjM1M2E1ZDViNTU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MWQ2YzA5YjdmYmNkODgyOWMwZjRmZGY5NWU5MzEyMmU3ZjcwMTFjNjEzZjUy
|
14
|
+
MWU1OWEzY2YzYTQ0MjlkYzUwMTMwNDA4YzEyYzAxOGIzMDQ5ZGU1MTA5N2Fl
|
15
|
+
MTJjMGNhMTlkZDU0NzljZmRiY2ZlY2Q5ZjEwNzgyMzQxNmY2NGQ=
|
@@ -70,11 +70,10 @@ module JenkinsPipelineBuilder
|
|
70
70
|
@project[:name] = "#{@project[:name]}-PR#{@number}" if @project[:name]
|
71
71
|
@project[:value][:name] = "#{@project[:value][:name]}-PR#{@number}" if @project[:value][:name]
|
72
72
|
|
73
|
-
return unless
|
73
|
+
return unless pull_generator[:value][:inject_pr_into]
|
74
74
|
|
75
|
-
key =
|
76
|
-
project[key] = "#{
|
77
|
-
project[:value][key] = "#{project[:value][key]}-PR#{@number}" if @project[:value][key]
|
75
|
+
key = pull_generator[:value][:inject_pr_into].to_sym
|
76
|
+
project[:value][key] = "{{#{key}}}-PR#{@number}" if project[:value]
|
78
77
|
end
|
79
78
|
|
80
79
|
# Apply any specified changes to each job
|
@@ -95,7 +95,6 @@ describe JenkinsPipelineBuilder::PullRequest do
|
|
95
95
|
{
|
96
96
|
name: 'pull_req_test',
|
97
97
|
type: :project,
|
98
|
-
inject_pr_into: :app_name,
|
99
98
|
app_name: 'my_app',
|
100
99
|
value: {
|
101
100
|
name: 'pull_req_test',
|
@@ -113,6 +112,7 @@ describe JenkinsPipelineBuilder::PullRequest do
|
|
113
112
|
git_repo: 'jenkins_pipeline_builder',
|
114
113
|
git_org: 'constantcontact',
|
115
114
|
value: {
|
115
|
+
inject_pr_into: :app_name,
|
116
116
|
jobs: ['{{app_name}}-10', '{{app_name}}-11']
|
117
117
|
},
|
118
118
|
builders: [
|
@@ -143,8 +143,7 @@ describe JenkinsPipelineBuilder::PullRequest do
|
|
143
143
|
end
|
144
144
|
it 'injects the pr number into the job name when told to' do
|
145
145
|
pull = pull_request_class.new project, 2, jobs, pull_request
|
146
|
-
expect(pull.project[:app_name]).to eq '
|
147
|
-
expect(pull.project[:value][:app_name]).to eq 'my_app-PR2'
|
146
|
+
expect(pull.project[:value][:app_name]).to eq '{{app_name}}-PR2'
|
148
147
|
end
|
149
148
|
end
|
150
149
|
end
|