jujube 0.6.0 → 0.7.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 224fc3cfd4590bf989a3250b87bdaaf8569da6c1
|
4
|
+
data.tar.gz: 39c38bb2cfcc91f4d2ded9db0acbf0d1823ff57b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5f79ab079fd8d4beecfb73006089fcf5697738838ac48b04a80fae7e44202a80bf79880fb4f81825efc9fa58c10a87dd4b236cf5e0a8e21e8d12e9f211dfb7c
|
7
|
+
data.tar.gz: d55cefbcb91d323e85d9b9338fafcd30d39259e9949328635b0a76ae548468566781af465c933ff0e54449aff4b84f23d20c8888d540d954d7b5804db20e1379
|
data/README.md
CHANGED
@@ -176,9 +176,12 @@ tackle it, contact me and I'll be happy to help.
|
|
176
176
|
|
177
177
|
1. Fork it
|
178
178
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
179
|
-
3.
|
180
|
-
|
181
|
-
|
179
|
+
3. Make your change. Please follow the coding conventions of the project and write good unit tests.
|
180
|
+
If you are adding a new component, please update `acceptance/fixtures/endToEnd/endToEnd.job` and
|
181
|
+
`acceptance/fixtures/endToEnd/expected.yml` as well.
|
182
|
+
4. Commit your changes (`git commit -am 'Add some feature'`)
|
183
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
184
|
+
6. Create new Pull Request
|
182
185
|
|
183
186
|
## Acknowledgements
|
184
187
|
|
@@ -32,6 +32,7 @@ job "endToEnd" do |j|
|
|
32
32
|
content << text("REGEX1", "REGEX2")
|
33
33
|
end
|
34
34
|
end
|
35
|
+
j.triggers << reverse(jobs: %w{PROJECT1 PROJECT2}, result: 'unstable')
|
35
36
|
|
36
37
|
j.wrappers << timeout(type: 'elastic', elastic_percentage: 150, elastic_default_timeout: 5, fail: true)
|
37
38
|
j.wrappers << timestamps
|
@@ -39,6 +39,22 @@ module Jujube
|
|
39
39
|
to_config("pollurl", nested_options(:urls, options, &block))
|
40
40
|
end
|
41
41
|
|
42
|
+
# Specify a `reverse` trigger for a job.
|
43
|
+
#
|
44
|
+
# See {http://ci.openstack.org/jenkins-job-builder/triggers.html#triggers.reverse}.
|
45
|
+
#
|
46
|
+
# @param options [Hash] The reverse project trigger options.
|
47
|
+
# @option options [String, Array<String>] :jobs The jobs to watch. Note that
|
48
|
+
# jenkins-job-builder takes a string of comma-separated job names; Jujube does that
|
49
|
+
# formatting automatically, so pass in a String or Array of Strings.
|
50
|
+
# @option options [String] :result Build results to monitor for.
|
51
|
+
# One of 'success', 'unstable' or 'failure'.
|
52
|
+
# @return [Hash] The specification for the component.
|
53
|
+
def reverse(options = {})
|
54
|
+
formatted_jobs = Array(options[:jobs]).join(", ")
|
55
|
+
to_config("reverse", options.merge(jobs: formatted_jobs))
|
56
|
+
end
|
57
|
+
|
42
58
|
# @!group pollurl Helpers
|
43
59
|
|
44
60
|
# Configure a URL to poll in a {#pollurl} component.
|
data/lib/jujube/version.rb
CHANGED
@@ -78,4 +78,10 @@ class TriggersTest < Minitest::Test
|
|
78
78
|
end
|
79
79
|
assert_equal(expected, actual)
|
80
80
|
end
|
81
|
+
|
82
|
+
def test_reverse
|
83
|
+
expected = { "reverse" => { "jobs" => "foo, bar", "result" => "success" } }
|
84
|
+
actual = reverse(jobs: %w{foo bar}, result: "success")
|
85
|
+
assert_equal(expected, actual)
|
86
|
+
end
|
81
87
|
end
|
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.
|
4
|
+
version: 0.7.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: 2014-
|
11
|
+
date: 2014-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|