jujube 0.7.0 → 0.8.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
  SHA1:
3
- metadata.gz: 224fc3cfd4590bf989a3250b87bdaaf8569da6c1
4
- data.tar.gz: 39c38bb2cfcc91f4d2ded9db0acbf0d1823ff57b
3
+ metadata.gz: 6524ef7e57991f6ffd460a6abdee60cdb03d42b2
4
+ data.tar.gz: 75f458ff13ab07e3db113e97ee802e4d1b328f3c
5
5
  SHA512:
6
- metadata.gz: e5f79ab079fd8d4beecfb73006089fcf5697738838ac48b04a80fae7e44202a80bf79880fb4f81825efc9fa58c10a87dd4b236cf5e0a8e21e8d12e9f211dfb7c
7
- data.tar.gz: d55cefbcb91d323e85d9b9338fafcd30d39259e9949328635b0a76ae548468566781af465c933ff0e54449aff4b84f23d20c8888d540d954d7b5804db20e1379
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
- * `scm`: (`git`)
109
- * `triggers`: (`pollscm`)
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`, `ircbot`, `junit`, `trigger`, `xunit`)
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",
@@ -14,6 +14,14 @@
14
14
  values:
15
15
  - i386
16
16
  - amd64
17
+ properties:
18
+ - throttle:
19
+ max-per-node: 2
20
+ max-total: 4
21
+ option: category
22
+ categories:
23
+ - CAT1
24
+ - CAT2
17
25
  scm:
18
26
  - git:
19
27
  url: URL
@@ -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
+
@@ -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
  #
@@ -1,3 +1,3 @@
1
1
  module Jujube
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
@@ -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.7.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