rubyjobbuilderdsl 0.0.5 → 0.0.6

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.
Files changed (111) hide show
  1. checksums.yaml +13 -5
  2. data/Gemfile +6 -6
  3. data/Gemfile.lock +41 -41
  4. data/LICENSE +18 -18
  5. data/Rakefile +12 -12
  6. data/docs/common.md +313 -313
  7. data/docs/flow.md +17 -17
  8. data/docs/freestyle.md +100 -100
  9. data/docs/gerrit.md +70 -70
  10. data/docs/git.md +88 -88
  11. data/docs/multi.md +26 -26
  12. data/docs/overview.md +74 -74
  13. data/docs/postbuild.md +266 -266
  14. data/docs/view.md +13 -13
  15. data/lib/rubyjobbuilderdsl.rb +2 -2
  16. data/lib/rubyjobbuilderdsl/buildstep/ant.rb +29 -29
  17. data/lib/rubyjobbuilderdsl/buildstep/copyartifact.rb +23 -23
  18. data/lib/rubyjobbuilderdsl/buildstep/inject_env.rb +18 -18
  19. data/lib/rubyjobbuilderdsl/buildstep/phase.rb +19 -19
  20. data/lib/rubyjobbuilderdsl/buildstep/phase_job.rb +26 -26
  21. data/lib/rubyjobbuilderdsl/buildstep/shell.rb +24 -24
  22. data/lib/rubyjobbuilderdsl/buildstep/xvfb.rb +46 -46
  23. data/lib/rubyjobbuilderdsl/common.rb +140 -140
  24. data/lib/rubyjobbuilderdsl/common/artifactory.rb +33 -33
  25. data/lib/rubyjobbuilderdsl/common/blocking_job.rb +11 -11
  26. data/lib/rubyjobbuilderdsl/common/build_timeout.rb +23 -23
  27. data/lib/rubyjobbuilderdsl/common/gerrit.rb +53 -53
  28. data/lib/rubyjobbuilderdsl/common/git.rb +76 -76
  29. data/lib/rubyjobbuilderdsl/common/logrotate.rb +24 -24
  30. data/lib/rubyjobbuilderdsl/common/parameter.rb +22 -22
  31. data/lib/rubyjobbuilderdsl/common/password.rb +12 -12
  32. data/lib/rubyjobbuilderdsl/common/pollscm.rb +10 -10
  33. data/lib/rubyjobbuilderdsl/common/scms.rb +18 -18
  34. data/lib/rubyjobbuilderdsl/common/throttle.rb +24 -24
  35. data/lib/rubyjobbuilderdsl/common/timed.rb +10 -10
  36. data/lib/rubyjobbuilderdsl/common/timestamps.rb +6 -6
  37. data/lib/rubyjobbuilderdsl/deployer.rb +95 -95
  38. data/lib/rubyjobbuilderdsl/flow.rb +14 -14
  39. data/lib/rubyjobbuilderdsl/freestyle.rb +65 -65
  40. data/lib/rubyjobbuilderdsl/jenkins_client.rb +203 -203
  41. data/lib/rubyjobbuilderdsl/multijob.rb +24 -24
  42. data/lib/rubyjobbuilderdsl/postbuild.rb +160 -160
  43. data/lib/rubyjobbuilderdsl/postbuild/archive.rb +23 -23
  44. data/lib/rubyjobbuilderdsl/postbuild/chucknorris_publisher.rb +6 -6
  45. data/lib/rubyjobbuilderdsl/postbuild/claim_publisher.rb +6 -6
  46. data/lib/rubyjobbuilderdsl/postbuild/cloverphp_publisher.rb +36 -36
  47. data/lib/rubyjobbuilderdsl/postbuild/cucumber_json_publisher.rb +20 -20
  48. data/lib/rubyjobbuilderdsl/postbuild/email_publisher.rb +23 -23
  49. data/lib/rubyjobbuilderdsl/postbuild/game_publisher.rb +6 -6
  50. data/lib/rubyjobbuilderdsl/postbuild/groovy.rb +10 -10
  51. data/lib/rubyjobbuilderdsl/postbuild/html_publisher.rb +27 -27
  52. data/lib/rubyjobbuilderdsl/postbuild/javadoc_publisher.rb +19 -19
  53. data/lib/rubyjobbuilderdsl/postbuild/logparser.rb +21 -21
  54. data/lib/rubyjobbuilderdsl/postbuild/nunit_publisher.rb +21 -21
  55. data/lib/rubyjobbuilderdsl/postbuild/pmd_publisher.rb +19 -19
  56. data/lib/rubyjobbuilderdsl/postbuild/script.rb +14 -14
  57. data/lib/rubyjobbuilderdsl/postbuild/tap_publisher.rb +44 -44
  58. data/lib/rubyjobbuilderdsl/postbuild/trigger.rb +38 -38
  59. data/lib/rubyjobbuilderdsl/postbuild/xunit_publisher.rb +35 -35
  60. data/lib/rubyjobbuilderdsl/view.rb +14 -14
  61. data/lib/rubyjobbuilderdsl/xml_generator.rb +1 -1
  62. data/rubyjobbuilderdsl.gemspec +2 -2
  63. data/rubyjobbuilderdsl.sublime-project +14 -14
  64. data/run_tests.sh +7 -7
  65. data/sample/hello_mars.rb +27 -27
  66. data/sample/hello_mars.xml +18 -0
  67. data/sample/hello_world-post.xml +40 -0
  68. data/sample/local.ini +4 -4
  69. data/sample/test.xml +21 -0
  70. data/test/test_ant.rb +38 -38
  71. data/test/test_archive.rb +24 -24
  72. data/test/test_artifactory.rb +26 -26
  73. data/test/test_blocking_job.rb +18 -18
  74. data/test/test_chucknorris_publisher.rb +17 -17
  75. data/test/test_claim_publisher.rb +17 -17
  76. data/test/test_cloverphp.rb +33 -33
  77. data/test/test_concurrent.rb +44 -44
  78. data/test/test_copyartifact.rb +45 -45
  79. data/test/test_cucumber_json_publisher.rb +30 -30
  80. data/test/test_default_setting.rb +29 -29
  81. data/test/test_email_publisher.rb +44 -44
  82. data/test/test_flow.rb +19 -19
  83. data/test/test_freestyle.rb +52 -52
  84. data/test/test_game_publisher.rb +17 -17
  85. data/test/test_gerrit.rb +117 -117
  86. data/test/test_git.rb +80 -80
  87. data/test/test_html_publisher.rb +57 -57
  88. data/test/test_inject.rb +23 -23
  89. data/test/test_javadoc.rb +22 -22
  90. data/test/test_logparser.rb +24 -24
  91. data/test/test_logrotate.rb +22 -22
  92. data/test/test_multijob.rb +50 -50
  93. data/test/test_nunit_publisher.rb +20 -20
  94. data/test/test_parameter.rb +44 -44
  95. data/test/test_password.rb +17 -17
  96. data/test/test_pmd.rb +22 -22
  97. data/test/test_pollscm.rb +15 -15
  98. data/test/test_postbuild_groovy.rb +21 -21
  99. data/test/test_postbuild_script.rb +24 -24
  100. data/test/test_postbuild_trigger.rb +170 -170
  101. data/test/test_scms.rb +31 -31
  102. data/test/test_tap_publisher.rb +25 -25
  103. data/test/test_timed.rb +15 -15
  104. data/test/test_timeout.rb +20 -20
  105. data/test/test_timestamps.rb +14 -14
  106. data/test/test_xml_generator.rb +28 -28
  107. data/test/test_xunit_publisher.rb +22 -22
  108. data/test/test_xvfb.rb +35 -35
  109. metadata +11 -10
  110. data/rubyjobbuilderdsl-0.0.3.gem +0 -0
  111. data/sample/Schedule-sample-pipeline.xml +0 -32
data/docs/multi.md CHANGED
@@ -1,27 +1,27 @@
1
- ## Create multi job project
2
-
3
- **phase**
4
-
5
- Description: Run a job phase. Phases are executed sequentially, however jobs within a phase run in parallel.
6
-
7
- Multiple: Add
8
-
9
- Example
10
-
11
- builder.multi 'hello_world-deploy' do
12
- phase 'hello_world-db-deploy' do
13
- job 'foo-db'
14
-
15
- job 'bar-db' do
16
- ignore_result true
17
- end
18
- end
19
-
20
- phase 'hello_world-service-deploy' do
21
- job 'foo-service' do
22
- retries 1
23
- abort_others false
24
- end
25
- job 'bar-service'
26
- end
1
+ ## Create multi job project
2
+
3
+ **phase**
4
+
5
+ Description: Run a job phase. Phases are executed sequentially, however jobs within a phase run in parallel.
6
+
7
+ Multiple: Add
8
+
9
+ Example
10
+
11
+ builder.multi 'hello_world-deploy' do
12
+ phase 'hello_world-db-deploy' do
13
+ job 'foo-db'
14
+
15
+ job 'bar-db' do
16
+ ignore_result true
17
+ end
18
+ end
19
+
20
+ phase 'hello_world-service-deploy' do
21
+ job 'foo-service' do
22
+ retries 1
23
+ abort_others false
24
+ end
25
+ job 'bar-service'
26
+ end
27
27
  end
data/docs/overview.md CHANGED
@@ -1,74 +1,74 @@
1
- ## Overview
2
-
3
- The Openstack Job Builder python project use YAML as input for job creation. It is huge step from creating job using XML or even worse UI.
4
- However YAML has limitation lacking of both composition and abstraction causing repetitive work and maintenance issue . It may well suit for
5
- creating of dozen of jobs but not hundreds similar jobs. This is driving factor for creation of Ruby Job Builder DSL.
6
-
7
- Ruby Jobs Builder DSL is ruby internal DSL, so it offers full fledged programming experience at the same time concise, focused vocabulary
8
- for job creation.
9
-
10
- Ruby Jobs Builder DSL can
11
-
12
- * generate Jenkins XML job configuration files
13
- * deploy jobs directly into Jenkins Server
14
-
15
- ## Example
16
-
17
- Step 1 - Create a ruby file e.g. hello-world.rb with the following content
18
-
19
- # hello-world.rb
20
- require 'rubyjobbuilderdsl'
21
- builder = JenkinsJob::Builder.new
22
- builder.freestyle 'hello-world' do
23
- shell 'echo hello world'
24
- end
25
- JenkinsJob::Deployer.new(builder).run
26
-
27
-
28
- Step 2 - Run it
29
-
30
- $bundle exec ruby hello-world.rb
31
- Usage:
32
- hello-world.rb [--xml --output-dir=.|--deploy --config-file=localhost.ini]
33
-
34
- Step 3 - Create XML
35
-
36
-
37
- sh-3.1$ bundle exec ruby hello-world.rb --xml --output-dir=.
38
- creating hello-world
39
- sh-3.1$ cat hello-world.xml
40
- <project>
41
- <actions/>
42
- <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
43
- <keepDependencies>false</keepDependencies>
44
- <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
45
- <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
46
- <concurrentBuild>false</concurrentBuild>
47
- <canRoam>true</canRoam>
48
- <properties/>
49
- <scm class="hudson.scm.NullSCM"/>
50
- <publishers/>
51
- <buildWrappers/>
52
- <builders>
53
- <hudson.tasks.Shell>
54
- <command>echo hello world</command>
55
- </hudson.tasks.Shell>
56
- </builders>
57
- </project>
58
-
59
- Step 4 - Upload the created job to your Jenkins server
60
-
61
- sh-3.1$ cat localhost.ini
62
- [jenkins]
63
- url=http://localhost:8080/
64
- user=jenkins-jobs
65
- password=7bb352e4f3da683c17247f3abf88f47c
66
-
67
- sh-3.1$ bundle exec ruby hello-world.rb --deploy ----config-file=localhost.ini
68
- deploying hello-world
69
-
70
- ## References
71
-
72
- * http://ci.openstack.org/jenkins-job-builder/
73
- * https://github.com/jenkinsci/jenkins.rb
74
- * https://github.com/jenkinsci/job-dsl-plugin/wiki/Job-DSL-Commands
1
+ ## Overview
2
+
3
+ The Openstack Job Builder python project use YAML as input for job creation. It is huge step from creating job using XML or even worse UI.
4
+ However YAML has limitation lacking of both composition and abstraction causing repetitive work and maintenance issue . It may well suit for
5
+ creating of dozen of jobs but not hundreds similar jobs. This is driving factor for creation of Ruby Job Builder DSL.
6
+
7
+ Ruby Jobs Builder DSL is ruby internal DSL, so it offers full fledged programming experience at the same time concise, focused vocabulary
8
+ for job creation.
9
+
10
+ Ruby Jobs Builder DSL can
11
+
12
+ * generate Jenkins XML job configuration files
13
+ * deploy jobs directly into Jenkins Server
14
+
15
+ ## Example
16
+
17
+ Step 1 - Create a ruby file e.g. hello-world.rb with the following content
18
+
19
+ # hello-world.rb
20
+ require 'rubyjobbuilderdsl'
21
+ builder = JenkinsJob::Builder.new
22
+ builder.freestyle 'hello-world' do
23
+ shell 'echo hello world'
24
+ end
25
+ JenkinsJob::Deployer.new(builder).run
26
+
27
+
28
+ Step 2 - Run it
29
+
30
+ $bundle exec ruby hello-world.rb
31
+ Usage:
32
+ hello-world.rb [--xml --output-dir=.|--deploy --config-file=localhost.ini]
33
+
34
+ Step 3 - Create XML
35
+
36
+
37
+ sh-3.1$ bundle exec ruby hello-world.rb --xml --output-dir=.
38
+ creating hello-world
39
+ sh-3.1$ cat hello-world.xml
40
+ <project>
41
+ <actions/>
42
+ <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
43
+ <keepDependencies>false</keepDependencies>
44
+ <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
45
+ <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
46
+ <concurrentBuild>false</concurrentBuild>
47
+ <canRoam>true</canRoam>
48
+ <properties/>
49
+ <scm class="hudson.scm.NullSCM"/>
50
+ <publishers/>
51
+ <buildWrappers/>
52
+ <builders>
53
+ <hudson.tasks.Shell>
54
+ <command>echo hello world</command>
55
+ </hudson.tasks.Shell>
56
+ </builders>
57
+ </project>
58
+
59
+ Step 4 - Upload the created job to your Jenkins server
60
+
61
+ sh-3.1$ cat localhost.ini
62
+ [jenkins]
63
+ url=http://localhost:8080/
64
+ user=jenkins-jobs
65
+ password=7bb352e4f3da683c17247f3abf88f47c
66
+
67
+ sh-3.1$ bundle exec ruby hello-world.rb --deploy ----config-file=localhost.ini
68
+ deploying hello-world
69
+
70
+ ## References
71
+
72
+ * http://ci.openstack.org/jenkins-job-builder/
73
+ * https://github.com/jenkinsci/jenkins.rb
74
+ * https://github.com/jenkinsci/job-dsl-plugin/wiki/Job-DSL-Commands
data/docs/postbuild.md CHANGED
@@ -1,266 +1,266 @@
1
- ## Configure post build activities
2
-
3
- **allow_broken_build_claiming**
4
-
5
- Description: Allow developer to claim for broken build
6
-
7
- Multiple: Override
8
-
9
- Example
10
-
11
- builder.freestyle 'hello_world-build' do
12
- postbuild do
13
- allow_broken_build_claiming
14
- end
15
- end
16
-
17
- **archive**
18
-
19
- Description: Archive artifacts
20
-
21
- Multiple: Override
22
-
23
- Example
24
-
25
- builder.freestyle 'hello_world-master' do
26
- postbuild do
27
- archive do
28
- file 'package/**',
29
- 'output/**',
30
- 'dependencies/lib/**'
31
- latest_only true
32
- end
33
- end
34
- end
35
-
36
- **chucknorris**
37
-
38
- Description: Show Chuck Norris Image
39
-
40
- Multiple: Override
41
-
42
- Example
43
-
44
- builder.freestyle 'hello_world-build' do
45
- postbuild do
46
- chucknorris
47
- end
48
- end
49
-
50
- **game**
51
-
52
- Description: Enable CI Game
53
-
54
- Multiple: Override
55
-
56
- Example
57
-
58
- builder.freestyle 'hello_world-build' do
59
- postbuild do
60
- game
61
- end
62
- end
63
-
64
- **groovy**
65
-
66
- Description: Run groovy script
67
-
68
- Multiple: Override
69
-
70
- Example
71
-
72
- builder.freestyle 'hello_world-build' do
73
- postbuild do
74
- groovy <<EOS
75
- def logger = manager.listener.logger
76
- logger.println("--- Hello World")
77
- EOS
78
- end
79
- end
80
-
81
- **logparser**
82
-
83
- Description: Parse console log to highlight errors
84
-
85
- Multiple: Override
86
-
87
- Example
88
-
89
- builder.freestyle 'hello_world-build' do
90
- postbuild do
91
- logparser '/var/lib/jenkins/build_parsing_rules' do
92
- fail_on_error
93
- end
94
- end
95
- end
96
-
97
- **pubish_pmd**
98
-
99
- Description: Publish PMD analysis
100
-
101
- Multiple: Override
102
-
103
- Example
104
-
105
- builder.freestyle 'hello_world' do
106
- postbuild do
107
- publish_pmd do
108
- pmd_results 'build/phppmd.txt'
109
- end
110
- end
111
- end
112
-
113
- **publish_cloverphp**
114
-
115
- Description: Publish clover php analysis
116
-
117
- Multiple: Override
118
-
119
- Example
120
-
121
- builder.freestyle 'hello_world' do
122
- postbuild do
123
- publish_cloverphp do
124
- xml_location 'build/coverage_clover.xml'
125
- html_report_dir 'build/coverage'
126
- healthy_target :method => 70, :statement => 80
127
- end
128
- end
129
- end
130
-
131
- **publish_html**
132
-
133
- Description: Publish html report
134
-
135
- Multiple: Override
136
-
137
- Example
138
-
139
- builder.freestyle 'hello_world-servicetest' do
140
- postbuild do
141
- publish_html 'Test Report' do
142
- dir '$BUILD_NUMBER\\Reports'
143
- file 'test-report.html'
144
- keep_all false
145
- allow_missing true
146
- end
147
- end
148
- end
149
-
150
- **publish_javadoc**
151
-
152
- Description: Publish javadoc
153
-
154
- Multiple: Override
155
-
156
- Example
157
-
158
- builder.freestyle 'hello_world-build' do
159
- postbuild do
160
- publish_javadoc do
161
- doc_dir 'build/doc'
162
- keep_all
163
- end
164
- end
165
- end
166
-
167
- **publish_nunit_report**
168
-
169
- Description: Publish NUnit test results.
170
-
171
- Multiple: Override
172
-
173
- Example
174
-
175
- builder.freestyle 'hello_world-build' do
176
- postbuild do
177
- publish_nunit_report 'foo\\bar\\*.xml'
178
- end
179
- end
180
-
181
- **publish_tap**
182
-
183
- Description: Publish TAP test result
184
-
185
- Multiple: Override
186
-
187
- Example
188
-
189
- builder.freestyle 'hello_world-build' do
190
- postbuild do
191
- publish_tap 'TestResultsInTapFormat.tap' do
192
- verbose true
193
- require_plan true
194
- end
195
- end
196
- end
197
-
198
- **publish_xunit_report**
199
-
200
- Description: Publish XUnit test results
201
-
202
- Multiple: Override
203
-
204
- Example
205
-
206
- builder.freestyle 'hello_world-build' do
207
- postbuild do
208
- publish_xunit_report 'foo\\bar\\*.xml' do
209
- failed_threshold :total_failed_tests => 0, :new_failed_tests => 0
210
- unstable_threshold :total_skipped_tests => 0, :new_skipped_tests => 0
211
- end
212
- end
213
- end
214
-
215
- **send_email**
216
-
217
- Description: Send notification via email
218
-
219
- Multiple: Override
220
-
221
- Example
222
-
223
- builder.freestyle 'hello_world-build' do
224
- postbuild do
225
- send_email 'test@example.com' do
226
- notify_every_unstable_build false
227
- send_to_individuals true
228
- end
229
- end
230
- end
231
-
232
- **shell**
233
-
234
- Description: Run shell command in as a post build action
235
-
236
- Multiple: Override
237
-
238
- Example
239
-
240
- builder.freestyle 'hello_world-build' do
241
- postbuild do
242
- shell 'cd Reports && mv $(ls *.xml) merge.xml'
243
- end
244
- end
245
-
246
- **trigger**
247
-
248
- Description: Trigger other job when this build succeeds
249
-
250
- Multiple: Override
251
-
252
- Example
253
-
254
- builder.freestyle 'hello_world-build' do
255
- postbuild do
256
- trigger 'foo-build', 'bar-build' do
257
- fail_on_missing true
258
- current_parameters true
259
- file 'env.properties'
260
- predefined_parameters 'BUILD_NUM' => '${BUILD_NUMBER}',
261
- 'PACKAGE_VERSION' => '${PACKAGE_VERSION}'
262
- end
263
- end
264
- end
265
-
266
-
1
+ ## Configure post build activities
2
+
3
+ **allow_broken_build_claiming**
4
+
5
+ Description: Allow developer to claim for broken build
6
+
7
+ Multiple: Override
8
+
9
+ Example
10
+
11
+ builder.freestyle 'hello_world-build' do
12
+ postbuild do
13
+ allow_broken_build_claiming
14
+ end
15
+ end
16
+
17
+ **archive**
18
+
19
+ Description: Archive artifacts
20
+
21
+ Multiple: Override
22
+
23
+ Example
24
+
25
+ builder.freestyle 'hello_world-master' do
26
+ postbuild do
27
+ archive do
28
+ file 'package/**',
29
+ 'output/**',
30
+ 'dependencies/lib/**'
31
+ latest_only true
32
+ end
33
+ end
34
+ end
35
+
36
+ **chucknorris**
37
+
38
+ Description: Show Chuck Norris Image
39
+
40
+ Multiple: Override
41
+
42
+ Example
43
+
44
+ builder.freestyle 'hello_world-build' do
45
+ postbuild do
46
+ chucknorris
47
+ end
48
+ end
49
+
50
+ **game**
51
+
52
+ Description: Enable CI Game
53
+
54
+ Multiple: Override
55
+
56
+ Example
57
+
58
+ builder.freestyle 'hello_world-build' do
59
+ postbuild do
60
+ game
61
+ end
62
+ end
63
+
64
+ **groovy**
65
+
66
+ Description: Run groovy script
67
+
68
+ Multiple: Override
69
+
70
+ Example
71
+
72
+ builder.freestyle 'hello_world-build' do
73
+ postbuild do
74
+ groovy <<EOS
75
+ def logger = manager.listener.logger
76
+ logger.println("--- Hello World")
77
+ EOS
78
+ end
79
+ end
80
+
81
+ **logparser**
82
+
83
+ Description: Parse console log to highlight errors
84
+
85
+ Multiple: Override
86
+
87
+ Example
88
+
89
+ builder.freestyle 'hello_world-build' do
90
+ postbuild do
91
+ logparser '/var/lib/jenkins/build_parsing_rules' do
92
+ fail_on_error
93
+ end
94
+ end
95
+ end
96
+
97
+ **pubish_pmd**
98
+
99
+ Description: Publish PMD analysis
100
+
101
+ Multiple: Override
102
+
103
+ Example
104
+
105
+ builder.freestyle 'hello_world' do
106
+ postbuild do
107
+ publish_pmd do
108
+ pmd_results 'build/phppmd.txt'
109
+ end
110
+ end
111
+ end
112
+
113
+ **publish_cloverphp**
114
+
115
+ Description: Publish clover php analysis
116
+
117
+ Multiple: Override
118
+
119
+ Example
120
+
121
+ builder.freestyle 'hello_world' do
122
+ postbuild do
123
+ publish_cloverphp do
124
+ xml_location 'build/coverage_clover.xml'
125
+ html_report_dir 'build/coverage'
126
+ healthy_target :method => 70, :statement => 80
127
+ end
128
+ end
129
+ end
130
+
131
+ **publish_html**
132
+
133
+ Description: Publish html report
134
+
135
+ Multiple: Override
136
+
137
+ Example
138
+
139
+ builder.freestyle 'hello_world-servicetest' do
140
+ postbuild do
141
+ publish_html 'Test Report' do
142
+ dir '$BUILD_NUMBER\\Reports'
143
+ file 'test-report.html'
144
+ keep_all false
145
+ allow_missing true
146
+ end
147
+ end
148
+ end
149
+
150
+ **publish_javadoc**
151
+
152
+ Description: Publish javadoc
153
+
154
+ Multiple: Override
155
+
156
+ Example
157
+
158
+ builder.freestyle 'hello_world-build' do
159
+ postbuild do
160
+ publish_javadoc do
161
+ doc_dir 'build/doc'
162
+ keep_all
163
+ end
164
+ end
165
+ end
166
+
167
+ **publish_nunit_report**
168
+
169
+ Description: Publish NUnit test results.
170
+
171
+ Multiple: Override
172
+
173
+ Example
174
+
175
+ builder.freestyle 'hello_world-build' do
176
+ postbuild do
177
+ publish_nunit_report 'foo\\bar\\*.xml'
178
+ end
179
+ end
180
+
181
+ **publish_tap**
182
+
183
+ Description: Publish TAP test result
184
+
185
+ Multiple: Override
186
+
187
+ Example
188
+
189
+ builder.freestyle 'hello_world-build' do
190
+ postbuild do
191
+ publish_tap 'TestResultsInTapFormat.tap' do
192
+ verbose true
193
+ require_plan true
194
+ end
195
+ end
196
+ end
197
+
198
+ **publish_xunit_report**
199
+
200
+ Description: Publish XUnit test results
201
+
202
+ Multiple: Override
203
+
204
+ Example
205
+
206
+ builder.freestyle 'hello_world-build' do
207
+ postbuild do
208
+ publish_xunit_report 'foo\\bar\\*.xml' do
209
+ failed_threshold :total_failed_tests => 0, :new_failed_tests => 0
210
+ unstable_threshold :total_skipped_tests => 0, :new_skipped_tests => 0
211
+ end
212
+ end
213
+ end
214
+
215
+ **send_email**
216
+
217
+ Description: Send notification via email
218
+
219
+ Multiple: Override
220
+
221
+ Example
222
+
223
+ builder.freestyle 'hello_world-build' do
224
+ postbuild do
225
+ send_email 'test@example.com' do
226
+ notify_every_unstable_build false
227
+ send_to_individuals true
228
+ end
229
+ end
230
+ end
231
+
232
+ **shell**
233
+
234
+ Description: Run shell command in as a post build action
235
+
236
+ Multiple: Override
237
+
238
+ Example
239
+
240
+ builder.freestyle 'hello_world-build' do
241
+ postbuild do
242
+ shell 'cd Reports && mv $(ls *.xml) merge.xml'
243
+ end
244
+ end
245
+
246
+ **trigger**
247
+
248
+ Description: Trigger other job when this build succeeds
249
+
250
+ Multiple: Override
251
+
252
+ Example
253
+
254
+ builder.freestyle 'hello_world-build' do
255
+ postbuild do
256
+ trigger 'foo-build', 'bar-build' do
257
+ fail_on_missing true
258
+ current_parameters true
259
+ file 'env.properties'
260
+ predefined_parameters 'BUILD_NUM' => '${BUILD_NUMBER}',
261
+ 'PACKAGE_VERSION' => '${PACKAGE_VERSION}'
262
+ end
263
+ end
264
+ end
265
+
266
+