jujube 0.7.0 → 0.8.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 +5 -3
- data/acceptance/fixtures/endToEnd/endToEnd.job +5 -0
- data/acceptance/fixtures/endToEnd/expected.yml +8 -0
- data/lib/jujube/components.rb +2 -0
- data/lib/jujube/components/properties.rb +19 -0
- data/lib/jujube/job.rb +11 -0
- data/lib/jujube/version.rb +1 -1
- data/test/components/properties_test.rb +10 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6524ef7e57991f6ffd460a6abdee60cdb03d42b2
|
4
|
+
data.tar.gz: 75f458ff13ab07e3db113e97ee802e4d1b328f3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf5a8812c001df66ded6cd60d931073896558b02039f437291cb4e711bcc6a2a43217feeb90711763ba26a9837d00ead0e257684edb10bd8beb5ec10dd3e47c7
|
7
|
+
data.tar.gz: 4e816332bb4b91f374df9499f46899c8a27ef39735cb42492e10c99269b4c7580b515be9ccd52770d0a506173b546a65d4bb3c310b658cbb15ba0870ad2a67b3
|
data/README.md
CHANGED
@@ -105,11 +105,13 @@ The following job attributes are supported:
|
|
105
105
|
The following sections and components are supported:
|
106
106
|
|
107
107
|
* `axes`: (`label_expression`, `slave`)
|
108
|
-
* `
|
109
|
-
* `
|
108
|
+
* `properties`: (`throttle`)
|
109
|
+
* `scm`: (`git`, `store`)
|
110
|
+
* `triggers`: (`pollscm`, `pollurl`, `reverse`)
|
110
111
|
* `wrappers`: (`timeout`, `timestamps`)
|
111
112
|
* `builders`: (`shell`)
|
112
|
-
* `publishers`: (`archive`, `cppcheck`, `email_ext`, `
|
113
|
+
* `publishers`: (`archive`, `cppcheck`, `email_ext`, `fitnesse`, `ircbot`, `junit`,
|
114
|
+
`trigger`, `unittest`, `xunit`)
|
113
115
|
* `notifications`: None defined yet
|
114
116
|
|
115
117
|
See [the end-to-end example job](examples/fixtures/endToEnd/endToEnd.job) for example
|
@@ -7,6 +7,11 @@ job "endToEnd" do |j|
|
|
7
7
|
|
8
8
|
j.axes << slave(:arch, %w{i386 amd64})
|
9
9
|
|
10
|
+
j.properties << throttle(max_per_node: 2,
|
11
|
+
max_total: 4,
|
12
|
+
option: "category",
|
13
|
+
categories: %w{CAT1 CAT2})
|
14
|
+
|
10
15
|
j.scm << git(url: "URL", branches: %w{master dev}, wipe_workspace: false)
|
11
16
|
j.scm << store(script: "SCRIPT",
|
12
17
|
repository: "REPO",
|
data/lib/jujube/components.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require_relative "components/macros"
|
2
2
|
require_relative "components/helpers"
|
3
3
|
require_relative "components/parameters"
|
4
|
+
require_relative "components/properties"
|
4
5
|
require_relative "components/scm"
|
5
6
|
require_relative "components/triggers"
|
6
7
|
require_relative "components/wrappers"
|
@@ -13,6 +14,7 @@ module Jujube
|
|
13
14
|
module Components
|
14
15
|
include Helpers
|
15
16
|
include Parameters
|
17
|
+
include Properties
|
16
18
|
include Scm
|
17
19
|
include Triggers
|
18
20
|
include Wrappers
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Jujube
|
2
|
+
module Components
|
3
|
+
|
4
|
+
# Helper methods for creating property components.
|
5
|
+
module Properties
|
6
|
+
extend Macros
|
7
|
+
|
8
|
+
# @!method throttle(options = {})
|
9
|
+
# Specify a `throttle` property for a job.
|
10
|
+
#
|
11
|
+
# See {http://ci.openstack.org/jenkins-job-builder/properties.html#properties.throttle}.
|
12
|
+
#
|
13
|
+
# @param options [Hash] The configuration options for the component.
|
14
|
+
# @return [Hash] The specification for the component.
|
15
|
+
standard_component :throttle
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
data/lib/jujube/job.rb
CHANGED
@@ -96,6 +96,17 @@ module Jujube
|
|
96
96
|
# @return [Array]
|
97
97
|
section :axes
|
98
98
|
|
99
|
+
# @!method properties
|
100
|
+
# The Properties for the job.
|
101
|
+
#
|
102
|
+
# Add properties in the job's configuration block using helper methods defined in
|
103
|
+
# {Components::Properties}.
|
104
|
+
#
|
105
|
+
# See {http://ci.openstack.org/jenkins-job-builder/properties.html}.
|
106
|
+
#
|
107
|
+
# @return [Array]
|
108
|
+
section :properties
|
109
|
+
|
99
110
|
# @!method scm
|
100
111
|
# The SCMs for the job.
|
101
112
|
#
|
data/lib/jujube/version.rb
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
require_relative "../test_helper"
|
2
|
+
|
3
|
+
class PropertiesTest < Minitest::Test
|
4
|
+
include Jujube::Components
|
5
|
+
|
6
|
+
def test_throttle
|
7
|
+
expected = {"throttle" => {"max-total" => 42, "option" => "category", "categories" => %w{cat1 cat2}}}
|
8
|
+
assert_equal(expected, throttle(max_total: 42, option: "category", categories: %w{cat1 cat2}))
|
9
|
+
end
|
10
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jujube
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Randy Coulman
|
@@ -117,6 +117,7 @@ files:
|
|
117
117
|
- lib/jujube/components/macros.rb
|
118
118
|
- lib/jujube/components/notifications.rb
|
119
119
|
- lib/jujube/components/parameters.rb
|
120
|
+
- lib/jujube/components/properties.rb
|
120
121
|
- lib/jujube/components/publishers.rb
|
121
122
|
- lib/jujube/components/scm.rb
|
122
123
|
- lib/jujube/components/triggers.rb
|
@@ -131,6 +132,7 @@ files:
|
|
131
132
|
- lib/jujube/version.rb
|
132
133
|
- test/components/builders_test.rb
|
133
134
|
- test/components/parameters_test.rb
|
135
|
+
- test/components/properties_test.rb
|
134
136
|
- test/components/publishers_test.rb
|
135
137
|
- test/components/scm_test.rb
|
136
138
|
- test/components/triggers_test.rb
|
@@ -176,6 +178,7 @@ test_files:
|
|
176
178
|
- acceptance/jujube/usage_test.rb
|
177
179
|
- test/components/builders_test.rb
|
178
180
|
- test/components/parameters_test.rb
|
181
|
+
- test/components/properties_test.rb
|
179
182
|
- test/components/publishers_test.rb
|
180
183
|
- test/components/scm_test.rb
|
181
184
|
- test/components/triggers_test.rb
|