jujube 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 686a1fe816b64601c238d50bc6e553335d4e490f2ee2efe0ebd58ca8ce07f5f5
4
- data.tar.gz: c3160bbd7c4324ea74386173f7edc643db411a3273e97e0b97b6ba16fb3befa7
3
+ metadata.gz: a148bb517bd4ae2bd3a7f5b7c30a22b8b9d90208a4110cb147242f3774fb0f6b
4
+ data.tar.gz: 73d85983940938cdb5fa875019f2c03bf458afea2a63d49b676929577aa10f8b
5
5
  SHA512:
6
- metadata.gz: 79c9dc2af5a9a58c6526724f6e7ab19041d56f4528be4164a16b2c3a65e6cdd87097fae9581d82aa00acd62dfcc4ba4edb0016b2a8424b28f09b10852ccd94b5
7
- data.tar.gz: 1459dd0c1cc8223a42e1effd988adbf94c9840d191e3bafcf33d397290ec255e92f7fd084e60254de95570074d845a4fee01f3a15b0b15dba38e7ede1ef8fbec
6
+ metadata.gz: d4327e583553f38d9c23380512dd3706cbf6902a3a71820cced4d8601957872ad435a7cea49ad4f37da06bf3e2da0f5e029322002ad8ed120ed4238e50e9c0a8
7
+ data.tar.gz: 730a71f92867705079e3ffcd31b8afaa61ae6c2bd63fb39b86336d70968df6876d8d201f6b2bcf8189328ea2154da406b077e7d0bfd30b38c73ebf0da6fd884e
data/.travis.yml CHANGED
@@ -10,4 +10,7 @@ matrix:
10
10
  - rvm: jruby-9
11
11
  - rvm: jruby-head
12
12
  fast_finish: true
13
- script: "bundle exec rake"
13
+ before_install:
14
+ - gem install bundler:1.17.3
15
+ - bundle _1.17.3_ install --jobs=3 --retry=3
16
+ script: "bundle _1.17.3_ exec rake"
data/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ## [Unreleased][unreleased]
7
7
 
8
+ ## [0.15.0][0.15.0]
9
+
10
+ ### Added
11
+
12
+ - Support the `gitlab` trigger (see https://docs.openstack.org/infra/jenkins-job-builder/triggers.html#triggers.gitlab) ([#18](https://github.com/randycoulman/jujube/pull/18)) (with @halverneus)
13
+
14
+ - Support the `gitlab-notifier` publisher (see https://docs.openstack.org/infra/jenkins-job-builder/publishers.html#publishers.gitlab-notifier) ([#19](https://github.com/randycoulman/jujube/pull/19)) (with @halverneus)
15
+
8
16
  ## [0.14.0][0.14.0]
9
17
 
10
18
  ### Added
@@ -92,7 +100,8 @@ adheres to [Semantic Versioning](http://semver.org/).
92
100
 
93
101
  - Initial public release.
94
102
 
95
- [unreleased]: https://github.com/randycoulman/jujube/compare/v0.14.0...HEAD
103
+ [unreleased]: https://github.com/randycoulman/jujube/compare/v0.15.0...HEAD
104
+ [0.15.0]: https://github.com/randycoulman/jujube/compare/v0.14.0...v0.15.0
96
105
  [0.14.0]: https://github.com/randycoulman/jujube/compare/v0.13.0...v0.14.0
97
106
  [0.13.0]: https://github.com/randycoulman/jujube/compare/v0.12.0...v0.13.0
98
107
  [0.12.0]: https://github.com/randycoulman/jujube/compare/v0.11.0...v0.12.0
@@ -31,6 +31,28 @@ job "endToEnd" do |j|
31
31
  pundles << package("PACKAGE") << bundle("BUNDLE")
32
32
  end
33
33
 
34
+ j.triggers << gitlab(
35
+ trigger_push: true,
36
+ trigger_merge_request: false,
37
+ trigger_accepted_merge_request: true,
38
+ trigger_closed_merge_request: false,
39
+ trigger_open_merge_request_push: "source",
40
+ trigger_note: true,
41
+ note_regex: "plz build",
42
+ ci_skip: false,
43
+ wip_skip: true,
44
+ set_build_description: false,
45
+ add_note_merge_request: true,
46
+ add_vote_merge_request: false,
47
+ accept_merge_request_on_success: true,
48
+ add_ci_message: false,
49
+ allow_all_branches: true,
50
+ branch_filter_type: "All",
51
+ include_branches: %w{branch1 branch2},
52
+ exclude_branches: %w{branch3 branch4},
53
+ target_branch_regex: "branch.*",
54
+ secret_token: "s3kr3t"
55
+ )
34
56
  j.triggers << pollscm(cron: "INTERVAL", ignore_post_commit_hooks: true)
35
57
  j.triggers << pollurl(cron: "CRON", polling_node: "NODE") do |urls|
36
58
  urls << url("URL",
@@ -59,6 +81,7 @@ job "endToEnd" do |j|
59
81
  j.publishers << cppcheck(pattern: "PATTERN")
60
82
  j.publishers << email_ext(recipients: %w{fred barney})
61
83
  j.publishers << fitnesse(results: "FITNESSE_RESULTS")
84
+ j.publishers << gitlab_notifier(name: "GITLAB", mark_unstable_as_success: true)
62
85
  j.publishers << ircbot(notify_start: true)
63
86
  j.publishers << junit(results: "RESULTS", keep_long_stdio: false)
64
87
  j.publishers << trigger(project: "PROJECT")
@@ -54,6 +54,31 @@
54
54
  - package: PACKAGE
55
55
  - bundle: BUNDLE
56
56
  triggers:
57
+ - gitlab:
58
+ trigger-push: true
59
+ trigger-merge-request: false
60
+ trigger-accepted-merge-request: true
61
+ trigger-closed-merge-request: false
62
+ trigger-open-merge-request-push: source
63
+ trigger-note: true
64
+ note-regex: plz build
65
+ ci-skip: false
66
+ wip-skip: true
67
+ set-build-description: false
68
+ add-note-merge-request: true
69
+ add-vote-merge-request: false
70
+ accept-merge-request-on-success: true
71
+ add-ci-message: false
72
+ allow-all-branches: true
73
+ branch-filter-type: All
74
+ include-branches:
75
+ - branch1
76
+ - branch2
77
+ exclude-branches:
78
+ - branch3
79
+ - branch4
80
+ target-branch-regex: "branch.*"
81
+ secret-token: s3kr3t
57
82
  - pollscm:
58
83
  cron: INTERVAL
59
84
  ignore-post-commit-hooks: true
@@ -72,14 +97,14 @@
72
97
  check-content:
73
98
  - simple: true
74
99
  - json:
75
- - JSON_PATH1
76
- - JSON_PATH2
100
+ - JSON_PATH1
101
+ - JSON_PATH2
77
102
  - xml:
78
- - XPATH1
79
- - XPATH2
103
+ - XPATH1
104
+ - XPATH2
80
105
  - text:
81
- - REGEX1
82
- - REGEX2
106
+ - REGEX1
107
+ - REGEX2
83
108
  - reverse:
84
109
  jobs: "PROJECT1, PROJECT2"
85
110
  result: unstable
@@ -110,6 +135,9 @@
110
135
  - barney
111
136
  - fitnesse:
112
137
  results: FITNESSE_RESULTS
138
+ - gitlab-notifier:
139
+ name: GITLAB
140
+ mark-unstable-as-success: true
113
141
  - ircbot:
114
142
  notify-start: true
115
143
  - junit:
@@ -118,34 +146,34 @@
118
146
  - trigger:
119
147
  project: PROJECT
120
148
  - trigger-parameterized-builds:
121
- - project:
122
- - PROJECT1
123
- - PROJECT2
124
- predefined-parameters: |
125
- param1=VALUE1
126
- param2=VALUE2
127
- current-parameters: true
128
- node-parameters: false
129
- svn-revision: true
130
- include-upstream: false
131
- git-revision:
132
- combine-queued-commits: true
133
- boolean-parameters:
149
+ - project:
150
+ - PROJECT1
151
+ - PROJECT2
152
+ predefined-parameters: |
153
+ param1=VALUE1
154
+ param2=VALUE2
155
+ current-parameters: true
156
+ node-parameters: false
157
+ svn-revision: true
158
+ include-upstream: false
159
+ git-revision:
160
+ combine-queued-commits: true
161
+ boolean-parameters:
134
162
  bool1: true
135
163
  bool2: false
136
- condition: FAILED_OR_BETTER
137
- property-file: FILE.properties
138
- fail-on-missing: true
139
- use-matrix-child-files: false
140
- only-exact-matrix-child-runs: true
141
- file-encoding: UTF-8
142
- trigger-with-no-params: false
143
- restrict-matrix-project: label=="x86"
144
- node-label-name: LABEL_NAME
145
- node-label: LABEL
146
- - project: SINGLE_PROJECT
147
- predefined-parameters: param=VALUE
148
- git-revision: true
164
+ condition: FAILED_OR_BETTER
165
+ property-file: FILE.properties
166
+ fail-on-missing: true
167
+ use-matrix-child-files: false
168
+ only-exact-matrix-child-runs: true
169
+ file-encoding: UTF-8
170
+ trigger-with-no-params: false
171
+ restrict-matrix-project: label=="x86"
172
+ node-label-name: LABEL_NAME
173
+ node-label: LABEL
174
+ - project: SINGLE_PROJECT
175
+ predefined-parameters: param=VALUE
176
+ git-revision: true
149
177
  - xunit:
150
178
  types:
151
179
  - unittest:
@@ -41,6 +41,15 @@ module Jujube
41
41
  # @return [Hash] The specification for the component.
42
42
  standard_component :fitnesse
43
43
 
44
+ # @!method gitlab_notifier(options = {})
45
+ # Specify a `gitlab-notifier` publisher for a job.
46
+ #
47
+ # See {https://docs.openstack.org/infra/jenkins-job-builder/publishers.html#publishers.gitlab-notifier}.
48
+ #
49
+ # @param options [Hash] The configuration options for the component.
50
+ # @return [Hash] The specification for the component.
51
+ standard_component :gitlab_notifier
52
+
44
53
  # @!method ircbot(options = {})
45
54
  # Specify an `ircbot` publisher for a job.
46
55
  #
@@ -5,6 +5,15 @@ module Jujube
5
5
  module Triggers
6
6
  extend Macros
7
7
 
8
+ # @!method gitlab(options = {})
9
+ # Specify a `gitlab` trigger for a job.
10
+ #
11
+ # See {https://docs.openstack.org/infra/jenkins-job-builder/triggers.html#triggers.gitlab}.
12
+ #
13
+ # @param options [Hash] The configuration options for the component.
14
+ # @return [Hash] The specification for the component.
15
+ standard_component :gitlab
16
+
8
17
  # @!method pollscm(options = {})
9
18
  # Specify a `pollscm` trigger for a job.
10
19
  #
@@ -1,5 +1,5 @@
1
1
  # Top-level namespace for the gem.
2
2
  module Jujube
3
3
  # The current gem version.
4
- VERSION = "0.14.0"
4
+ VERSION = "0.15.0"
5
5
  end
@@ -27,6 +27,11 @@ class PublishersTest < Minitest::Test
27
27
  assert_equal(expected, fitnesse(results: "RESULTS"))
28
28
  end
29
29
 
30
+ def test_gitlab_notifier
31
+ expected = {"gitlab-notifier" => {"name" => "NAME"}}
32
+ assert_equal(expected, gitlab_notifier(name: "NAME"))
33
+ end
34
+
30
35
  def test_ircbot
31
36
  expected = {"ircbot" => {"notify-start" => true}}
32
37
  assert_equal(expected, ircbot(notify_start: true))
@@ -3,6 +3,22 @@ require_relative "../test_helper"
3
3
  class TriggersTest < Minitest::Test
4
4
  include Jujube::Components
5
5
 
6
+ def test_gitlab
7
+ expected = {
8
+ "gitlab" => {
9
+ "trigger-note" => false,
10
+ "target-branch-regex" => "branches.*",
11
+ "include-branches" => ["b1", "b2"]
12
+ }
13
+ }
14
+ actual = gitlab(
15
+ trigger_note: false,
16
+ target_branch_regex: "branches.*",
17
+ include_branches: %w{b1 b2}
18
+ )
19
+ assert_equal(expected, actual)
20
+ end
21
+
6
22
  def test_pollscm
7
23
  expected = {
8
24
  "pollscm" => {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jujube
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Randy Coulman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-17 00:00:00.000000000 Z
11
+ date: 2021-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler