jenkins_pipeline_builder 0.1.6 → 0.2.0
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 +4 -4
- data/README.md +16 -4
- data/lib/jenkins_pipeline_builder/builders.rb +1 -1
- data/lib/jenkins_pipeline_builder/generator.rb +2 -1
- data/lib/jenkins_pipeline_builder/version.rb +1 -1
- data/lib/jenkins_pipeline_builder/wrappers.rb +44 -2
- data/spec/unit_tests/fixtures/files/Job-Build-Maven.xml +39 -0
- data/spec/unit_tests/fixtures/files/Job-Build-Maven.yaml +5 -0
- data/spec/unit_tests/fixtures/files/Job-Gem-Build.yaml +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6388662ca895ddc734a5aba148075f4d1ca06ec
|
4
|
+
data.tar.gz: e22efe806c6c5558996cd4af38629ebba14fff8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79c70051777c8cb7fef36c5666d4b7cc30d1bd8ca76a740dc46face5dcb844c34684f19d7139436dc63ad5157114b96ca9ea07aaf4c27be23aaf584e48c9e92a
|
7
|
+
data.tar.gz: bbea1cdcae6fe68886f7e78461476b90a269448af4ae2166d9fd9692797252a222eae3ac5824e02040df7a1f180cc21459c6317178824264168983bed1b8c855
|
data/README.md
CHANGED
@@ -70,8 +70,11 @@ in a config file (ex: config.login.yml)
|
|
70
70
|
|
71
71
|
Now you ready to bootstrap a pipeline:
|
72
72
|
|
73
|
-
generate pipeline -
|
73
|
+
generate pipeline -c config/login.yml bootstrap ./pipeline
|
74
|
+
|
75
|
+
NOTE: you can run the pipeline in NOOP (debug-only) mode by addind -d parameter, like:
|
74
76
|
|
77
|
+
generate pipeline -d -c config/login.yml bootstrap ./pipeline
|
75
78
|
|
76
79
|
DSL:
|
77
80
|
----
|
@@ -112,15 +115,23 @@ Here's a high level overview of what's available:
|
|
112
115
|
run command1
|
113
116
|
- maven3:
|
114
117
|
goals: -B clean
|
118
|
+
mavenName: maven-name # Optional
|
115
119
|
wrappers:
|
116
120
|
- timestamp: true
|
117
121
|
- ansicolor: true
|
118
122
|
- artifactory:
|
119
123
|
url: 'https://url.com/path'
|
120
124
|
artifactory-name: 'key'
|
121
|
-
|
125
|
+
release-repo: release
|
126
|
+
snapshot-repo: snapshot
|
122
127
|
publish: 'pkg/*.gem'
|
123
|
-
publish-build-info: true
|
128
|
+
publish-build-info: true # Optional
|
129
|
+
- maven3artifactory:
|
130
|
+
url: https://artifactory.com/artifactory
|
131
|
+
artifactory-name: name
|
132
|
+
release-repo: release
|
133
|
+
snapshot-repo: snapshot
|
134
|
+
publish-build-info: true # Optional
|
124
135
|
- inject_env_var: |
|
125
136
|
VAR1 = value_1
|
126
137
|
VAR2 = value_2
|
@@ -175,8 +186,9 @@ Here's a high level overview of what's available:
|
|
175
186
|
name: 'view name'
|
176
187
|
type: 'listview' # Optional: listview [default], myview, nestedView, categorizedView, dashboardView, multijobView
|
177
188
|
description: 'description'
|
189
|
+
parent_view: 'Parent View Name' # Optional, when you're using tested views
|
178
190
|
regex: '.*'
|
179
|
-
groupingRules:
|
191
|
+
groupingRules: # Optional, when you are using Categorized view
|
180
192
|
- groupRegex: "1.*"
|
181
193
|
namingRule: "sub view"
|
182
194
|
```
|
@@ -48,7 +48,7 @@ module JenkinsPipelineBuilder
|
|
48
48
|
|
49
49
|
def self.build_maven3(params, xml)
|
50
50
|
xml.send('org.jfrog.hudson.maven3.Maven3Builder') {
|
51
|
-
xml.mavenName 'tools-maven-3.0.3'
|
51
|
+
xml.mavenName params[:mavenName] || 'tools-maven-3.0.3'
|
52
52
|
xml.rootPom params[:rootPom]
|
53
53
|
xml.goals params[:goals]
|
54
54
|
xml.mavenOpts params[:options]
|
@@ -76,7 +76,8 @@ module JenkinsPipelineBuilder
|
|
76
76
|
artifactory: Wrappers.method(:publish_to_artifactory),
|
77
77
|
rvm: Wrappers.method(:run_with_rvm),
|
78
78
|
inject_env_var: Wrappers.method(:inject_env_vars),
|
79
|
-
inject_passwords: Wrappers.method(:inject_passwords)
|
79
|
+
inject_passwords: Wrappers.method(:inject_passwords),
|
80
|
+
maven3artifactory: Wrappers.method(:artifactory_maven3_configurator)
|
80
81
|
},
|
81
82
|
method:
|
82
83
|
lambda { |registry, params, n_xml| @module_registry.run_registry_on_path('//buildWrappers', registry, params, n_xml) }
|
@@ -71,8 +71,8 @@ module JenkinsPipelineBuilder
|
|
71
71
|
xml.details {
|
72
72
|
xml.artifactoryUrl wrapper[:url]
|
73
73
|
xml.artifactoryName wrapper[:'artifactory-name']
|
74
|
-
xml.repositoryKey wrapper[:'
|
75
|
-
xml.snapshotsRepositoryKey wrapper[:'
|
74
|
+
xml.repositoryKey wrapper[:'release-repo']
|
75
|
+
xml.snapshotsRepositoryKey wrapper.fetch(:'snapshot-repo', wrapper[:'release-repo'])
|
76
76
|
}
|
77
77
|
xml.deployPattern wrapper[:publish]
|
78
78
|
xml.resolvePattern
|
@@ -87,5 +87,47 @@ module JenkinsPipelineBuilder
|
|
87
87
|
xml.discardBuildArtifacts true
|
88
88
|
}
|
89
89
|
end
|
90
|
+
|
91
|
+
def self.artifactory_maven3_configurator(wrapper, xml)
|
92
|
+
xml.send('org.jfrog.hudson.maven3.ArtifactoryMaven3Configurator') { # plugin="artifactory@2.2.1"
|
93
|
+
xml.details {
|
94
|
+
xml.artifactoryUrl wrapper[:url]
|
95
|
+
xml.artifactoryName wrapper[:'artifactory-name']
|
96
|
+
xml.repositoryKey wrapper[:'release-repo']
|
97
|
+
xml.snapshotsRepositoryKey wrapper.fetch(:'snapshot-repo', wrapper[:'release-repo'])
|
98
|
+
}
|
99
|
+
xml.deployArtifacts wrapper.fetch(:'deploy', true)
|
100
|
+
xml.artifactDeploymentPatterns {
|
101
|
+
xml.includePatterns
|
102
|
+
xml.excludePatterns
|
103
|
+
}
|
104
|
+
xml.includeEnvVars false
|
105
|
+
xml.deployBuildInfo wrapper.fetch(:'publish-build-info', true)
|
106
|
+
xml.envVarsPatterns {
|
107
|
+
xml.includePatterns
|
108
|
+
xml.excludePatterns '*password*,*secret*'
|
109
|
+
}
|
110
|
+
xml.runChecks false
|
111
|
+
xml.violationRecipients
|
112
|
+
xml.includePublishArtifacts false
|
113
|
+
xml.scopes
|
114
|
+
xml.licenseAutoDiscovery true
|
115
|
+
xml.disableLicenseAutoDiscovery false
|
116
|
+
xml.discardOldBuilds false
|
117
|
+
xml.discardBuildArtifacts true
|
118
|
+
xml.matrixParams
|
119
|
+
xml.enableIssueTrackerIntegration false
|
120
|
+
xml.aggregateBuildIssues false
|
121
|
+
xml.blackDuckRunChecks false
|
122
|
+
xml.blackDuckAppName
|
123
|
+
xml.blackDuckAppVersion
|
124
|
+
xml.blackDuckReportRecipients
|
125
|
+
xml.blackDuckScopes
|
126
|
+
xml.blackDuckIncludePublishedArtifacts false
|
127
|
+
xml.autoCreateMissingComponentRequests true
|
128
|
+
xml.autoDiscardStaleComponentRequests true
|
129
|
+
xml.filterExcludedArtifactsFromBuild false
|
130
|
+
}
|
131
|
+
end
|
90
132
|
end
|
91
133
|
end
|
@@ -86,5 +86,44 @@
|
|
86
86
|
</publishers>
|
87
87
|
<buildWrappers>
|
88
88
|
<hudson.plugins.timestamper.TimestamperBuildWrapper/>
|
89
|
+
<org.jfrog.hudson.maven3.ArtifactoryMaven3Configurator>
|
90
|
+
<details>
|
91
|
+
<artifactoryUrl>https://artifactory.com/artifactory</artifactoryUrl>
|
92
|
+
<artifactoryName>name</artifactoryName>
|
93
|
+
<repositoryKey>release</repositoryKey>
|
94
|
+
<snapshotsRepositoryKey>snapshot</snapshotsRepositoryKey>
|
95
|
+
</details>
|
96
|
+
<deployArtifacts>true</deployArtifacts>
|
97
|
+
<artifactDeploymentPatterns>
|
98
|
+
<includePatterns></includePatterns>
|
99
|
+
<excludePatterns></excludePatterns>
|
100
|
+
</artifactDeploymentPatterns>
|
101
|
+
<includeEnvVars>false</includeEnvVars>
|
102
|
+
<deployBuildInfo>true</deployBuildInfo>
|
103
|
+
<envVarsPatterns>
|
104
|
+
<includePatterns></includePatterns>
|
105
|
+
<excludePatterns>*password*,*secret*</excludePatterns>
|
106
|
+
</envVarsPatterns>
|
107
|
+
<runChecks>false</runChecks>
|
108
|
+
<violationRecipients></violationRecipients>
|
109
|
+
<includePublishArtifacts>false</includePublishArtifacts>
|
110
|
+
<scopes></scopes>
|
111
|
+
<licenseAutoDiscovery>true</licenseAutoDiscovery>
|
112
|
+
<disableLicenseAutoDiscovery>false</disableLicenseAutoDiscovery>
|
113
|
+
<discardOldBuilds>false</discardOldBuilds>
|
114
|
+
<discardBuildArtifacts>true</discardBuildArtifacts>
|
115
|
+
<matrixParams></matrixParams>
|
116
|
+
<enableIssueTrackerIntegration>false</enableIssueTrackerIntegration>
|
117
|
+
<aggregateBuildIssues>false</aggregateBuildIssues>
|
118
|
+
<blackDuckRunChecks>false</blackDuckRunChecks>
|
119
|
+
<blackDuckAppName></blackDuckAppName>
|
120
|
+
<blackDuckAppVersion></blackDuckAppVersion>
|
121
|
+
<blackDuckReportRecipients></blackDuckReportRecipients>
|
122
|
+
<blackDuckScopes></blackDuckScopes>
|
123
|
+
<blackDuckIncludePublishedArtifacts>false</blackDuckIncludePublishedArtifacts>
|
124
|
+
<autoCreateMissingComponentRequests>true</autoCreateMissingComponentRequests>
|
125
|
+
<autoDiscardStaleComponentRequests>true</autoDiscardStaleComponentRequests>
|
126
|
+
<filterExcludedArtifactsFromBuild>false</filterExcludedArtifactsFromBuild>
|
127
|
+
</org.jfrog.hudson.maven3.ArtifactoryMaven3Configurator>
|
89
128
|
</buildWrappers>
|
90
129
|
</project>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jenkins_pipeline_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Moochnick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|