jenkins_pipeline_builder 0.10.9 → 0.10.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/.ackrc +1 -0
- data/.rubocop.yml +4 -19
- data/lib/jenkins_pipeline_builder/compiler.rb +5 -0
- data/lib/jenkins_pipeline_builder/generator.rb +10 -2
- data/lib/jenkins_pipeline_builder/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmUwNjNjYjdjZmU2MWU4MTkwYTE4MzEzZTVkNGFmODY3YjE4MjA1NQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGI1NWE3YWQ5NjBlMjJhZWNjMWU3NmRiN2M0ODRjMTk5YzZmN2I5ZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTZkZDM0Y2QwZjY1YjhlMzBmYjdjZTg2ODA3N2E3OWM5NjVjMjgxYTdlN2M3
|
10
|
+
Y2NiMjg3ZGRhMDA0ZTk1YWY1NzliYjYwODM0ZmFmNTdlY2Q0MDAzNGExM2U1
|
11
|
+
MDU2YmU0NzE0OWY5NzI1MDE3MWQ1NTJkMDllMDFkMmUzYjEwYzE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGVhOWQ4MGMwOTAyYjFmMjE4OTQ0MzYwYjg4Yzg1ZDUzMTY1ZjhmNmNjZDg3
|
14
|
+
MTczOGYwOGY5MGJjNDM5ZWI0MGQ3ZTFlOWE5YTJhZmFjOWRhNzE0Mjg4NGNk
|
15
|
+
Y2RmOGIyYWQ2MWI4MDY0NTdhOWU5Y2JmMmNlMmNiYTg2Y2M5ZDM=
|
data/.ackrc
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,24 +1,13 @@
|
|
1
|
-
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
-
# on 2014-06-23 17:07:53 -0400 using RuboCop version 0.23.0.
|
3
|
-
# The point is for the user to remove these configuration records
|
4
|
-
# one by one as the offenses are removed from the code base.
|
5
|
-
# Note that changes in the inspected code, or installation of new
|
6
|
-
# versions of RuboCop, may require this file to be generated again.
|
7
|
-
|
8
1
|
#######
|
9
|
-
# WIP
|
2
|
+
# WIP These should all go back to defaults at some point
|
10
3
|
Metrics/CyclomaticComplexity:
|
11
4
|
Max: 9
|
12
|
-
|
13
5
|
Metrics/PerceivedComplexity:
|
14
6
|
Max: 11
|
15
|
-
|
16
|
-
|
17
|
-
# Fix these later
|
18
|
-
# Configuration parameters: CountComments.
|
7
|
+
Metrics/MethodLength:
|
8
|
+
Max: 27
|
19
9
|
Metrics/ClassLength:
|
20
|
-
|
21
|
-
Max: 500
|
10
|
+
Max: 525
|
22
11
|
|
23
12
|
#######
|
24
13
|
# Finalized settings
|
@@ -32,10 +21,6 @@ Metrics/LineLength:
|
|
32
21
|
- 'spec/lib/jenkins_pipeline_builder/pull_request_generator_spec.rb'
|
33
22
|
- 'lib/jenkins_pipeline_builder/extensions/*'
|
34
23
|
|
35
|
-
# Configuration parameters: CountComments.
|
36
|
-
Metrics/MethodLength:
|
37
|
-
Max: 25
|
38
|
-
|
39
24
|
Style/Documentation:
|
40
25
|
Enabled: false
|
41
26
|
|
@@ -23,6 +23,11 @@
|
|
23
23
|
module JenkinsPipelineBuilder
|
24
24
|
class Compiler
|
25
25
|
def self.resolve_value(value, settings, job_collection)
|
26
|
+
# pull@ designates that this is a reference to a job that will be generated
|
27
|
+
# for a pull request, so we want to save the resolution for the second pass
|
28
|
+
pull_job = value.to_s.match(/{{pull@(.*)}}/)
|
29
|
+
return pull_job[1] if pull_job
|
30
|
+
|
26
31
|
settings = settings.with_indifferent_access
|
27
32
|
value_s = value.to_s.clone
|
28
33
|
# First we try to do job name correction
|
@@ -90,12 +90,16 @@ module JenkinsPipelineBuilder
|
|
90
90
|
load_collection_from_path(path)
|
91
91
|
cleanup_temp_remote
|
92
92
|
logger.info "Project: #{projects}"
|
93
|
+
errors = {}
|
93
94
|
projects.each do |project|
|
94
95
|
next unless project[:name] == project_name || project_name.nil?
|
95
96
|
logger.info "Using Project #{project}"
|
96
97
|
pull_job = find_pull_request_generator(project)
|
97
98
|
p_success, p_payload = compile_pull_request_generator(pull_job[:name], project)
|
98
|
-
|
99
|
+
unless p_success
|
100
|
+
errors[pull_job[:name]] = p_payload
|
101
|
+
next
|
102
|
+
end
|
99
103
|
jobs = filter_pull_request_jobs(pull_job)
|
100
104
|
pull = JenkinsPipelineBuilder::PullRequestGenerator.new(project, jobs, p_payload)
|
101
105
|
@job_collection.merge! pull.jobs
|
@@ -103,6 +107,10 @@ module JenkinsPipelineBuilder
|
|
103
107
|
failed = success unless success
|
104
108
|
purge_pull_request_jobs(pull)
|
105
109
|
end
|
110
|
+
errors.each do |k, v|
|
111
|
+
logger.error "Encountered errors compiling: #{k}:"
|
112
|
+
logger.error v
|
113
|
+
end
|
106
114
|
!failed
|
107
115
|
end
|
108
116
|
|
@@ -384,7 +392,7 @@ module JenkinsPipelineBuilder
|
|
384
392
|
next unless j
|
385
393
|
|
386
394
|
Utils.hash_merge!(j, job[job_id])
|
387
|
-
j[:value][:name] = j[:job_name] if j[:job_name]
|
395
|
+
j[:value][:name] = j[:value][:job_name] if j[:value][:job_name]
|
388
396
|
end
|
389
397
|
end
|
390
398
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jenkins_pipeline_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Moochnick
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-03-
|
12
|
+
date: 2015-03-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|