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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7737317cba0817ca6e49cf3441225c74888f582b
4
- data.tar.gz: c7758bd197ab65ad95a555a5e8b8e1c38ed2ba4f
3
+ metadata.gz: f6388662ca895ddc734a5aba148075f4d1ca06ec
4
+ data.tar.gz: e22efe806c6c5558996cd4af38629ebba14fff8a
5
5
  SHA512:
6
- metadata.gz: 8b118f7d6abb15cfe7ad0ec0b4ae8faaf38ec3eaf2f4cae5629164acf154f427c2ced2414564e3c7bd54a8b9d83d284a2c96c0050b6d4e094a10cd1bcaf9986f
7
- data.tar.gz: e48d87c7d75b2e384c1fe241308e4b1c12b2fd2e29eab7b3f95fa7f45be18163e85d91ef4b61e07ade6fa7658b62a2618c512cc5d86165a6113cd39cef42698e
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 -d -c config/login.yml bootstrap ./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
- target-repo: gems-local
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) }
@@ -21,5 +21,5 @@
21
21
  #
22
22
 
23
23
  module JenkinsPipelineBuilder
24
- VERSION = "0.1.6"
24
+ VERSION = "0.2.0"
25
25
  end
@@ -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[:'target-repo']
75
- xml.snapshotsRepositoryKey wrapper[:'target-repo']
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>
@@ -24,3 +24,8 @@
24
24
  - params: VM_NAME=${VM_NAME}
25
25
  wrappers:
26
26
  - timestamp: true
27
+ - maven3artifactory:
28
+ url: https://artifactory.com/artifactory
29
+ artifactory-name: name
30
+ release-repo: release
31
+ snapshot-repo: snapshot
@@ -14,7 +14,7 @@
14
14
  - artifactory:
15
15
  url: 'https://artifactory.com/artifactory'
16
16
  artifactory-name: 'key'
17
- target-repo: gems-local
17
+ release-repo: gems-local
18
18
  publish: 'pkg/*.gem'
19
19
  publish-build-info: true
20
20
  - inject_env_var: >
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.1.6
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-03-12 00:00:00.000000000 Z
11
+ date: 2014-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri