jujube 0.5.0 → 0.5.1
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 +6 -0
- data/acceptance/fixtures/endToEnd/endToEnd.job +7 -0
- data/acceptance/fixtures/endToEnd/expected.yml +9 -0
- data/lib/jujube/components/scm.rb +45 -1
- data/lib/jujube/components/triggers.rb +1 -1
- data/lib/jujube/version.rb +1 -1
- data/test/components/scm_test.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eac8dcc322729f19c5b0fd1a0db99ce632a80ece
|
4
|
+
data.tar.gz: 5273ed11c7de17307ac71275716f0545800246bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1125ab14a40bafbed7f3ba0c5f7891ab01a478325ceb71e987e9522f19736a856803b285401621b57533f89b65db03bad7af176fcc2072f7e7271e1e34a5e0b6
|
7
|
+
data.tar.gz: b6732b0f405b5e7b100156777c787db8cccd519622512f3a9ae92f16e4355859b1808f6976af18c0b5518a3fe5da74694f72c3568d0fd51acaf42b7cb6b91e04
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# Jujube
|
2
2
|
|
3
|
+
[](http://badge.fury.io/rb/jujube)
|
3
4
|
[](https://travis-ci.org/randycoulman/jujube)
|
4
5
|
[](https://codeclimate.com/github/randycoulman/jujube)
|
5
6
|
|
@@ -178,3 +179,8 @@ tackle it, contact me and I'll be happy to help.
|
|
178
179
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
179
180
|
4. Push to the branch (`git push origin my-new-feature`)
|
180
181
|
5. Create new Pull Request
|
182
|
+
|
183
|
+
## Acknowledgements
|
184
|
+
|
185
|
+
Thanks to Jason Roelofs, Chris Gaffney, and Sarah Mei for their input and feedback as I worked
|
186
|
+
on this project.
|
@@ -8,6 +8,13 @@ job "endToEnd" do |j|
|
|
8
8
|
j.axes << slave(:arch, %w{i386 amd64})
|
9
9
|
|
10
10
|
j.scm << git(url: "URL", branches: %w{master dev}, wipe_workspace: false)
|
11
|
+
j.scm << store(script: "SCRIPT",
|
12
|
+
repository: "REPO",
|
13
|
+
version_regex: "REGEX",
|
14
|
+
parcel_builder_file: "FILENAME",
|
15
|
+
minimum_blessing: "BLESSING") do |pundles|
|
16
|
+
pundles << package("PACKAGE") << bundle("BUNDLE")
|
17
|
+
end
|
11
18
|
|
12
19
|
j.triggers << pollscm("INTERVAL")
|
13
20
|
j.triggers << pollurl(cron: "CRON", polling_node: "NODE") do |urls|
|
@@ -21,6 +21,15 @@
|
|
21
21
|
- master
|
22
22
|
- dev
|
23
23
|
wipe-workspace: false
|
24
|
+
- store:
|
25
|
+
script: SCRIPT
|
26
|
+
repository: REPO
|
27
|
+
version-regex: REGEX
|
28
|
+
parcel-builder-file: FILENAME
|
29
|
+
minimum-blessing: BLESSING
|
30
|
+
pundles:
|
31
|
+
- package: PACKAGE
|
32
|
+
- bundle: BUNDLE
|
24
33
|
triggers:
|
25
34
|
- pollscm: INTERVAL
|
26
35
|
- pollurl:
|
@@ -6,7 +6,7 @@ module Jujube
|
|
6
6
|
extend Macros
|
7
7
|
|
8
8
|
# @!method git(options = {})
|
9
|
-
# Specify a `git`
|
9
|
+
# Specify a `git` SCM for a job.
|
10
10
|
#
|
11
11
|
# See {http://ci.openstack.org/jenkins-job-builder/publishers.html#scm.git}.
|
12
12
|
#
|
@@ -14,6 +14,50 @@ module Jujube
|
|
14
14
|
# @return [Hash] The specification for the component.
|
15
15
|
standard_component :git
|
16
16
|
|
17
|
+
# Specify a `store` SCM for a job.
|
18
|
+
#
|
19
|
+
# This trigger requires support in jenkins-job-builder that has not yet been merged.
|
20
|
+
# See {https://review.openstack.org/85729} for the patch.
|
21
|
+
#
|
22
|
+
# `store` can watch multiple pundles (packages or bundles) The specification for each
|
23
|
+
# pundle is added in a nested configuration block using the {#package} or {#bundle} method.
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# job "store-example" do |j|
|
27
|
+
# j.scm << store(script: "SCRIPT", repository: "REPO") do |pundles|
|
28
|
+
# pundles << package("PACKAGE")
|
29
|
+
# pundles << bundle("BUNDLE")
|
30
|
+
# end
|
31
|
+
# end
|
32
|
+
#
|
33
|
+
# @param options [Hash] Top-level options for configuring the component.
|
34
|
+
# @yieldparam pundles [Array] An array to which nested pundle specifications should be
|
35
|
+
# added by the block.
|
36
|
+
# @return [Hash] The specification for the component.
|
37
|
+
def store(options = {}, &block)
|
38
|
+
to_config("store", nested_options(:pundles, options, &block))
|
39
|
+
end
|
40
|
+
|
41
|
+
# @!group store Pundle Specifications
|
42
|
+
|
43
|
+
# Specify a `package` to check for a {#store} SCM.
|
44
|
+
#
|
45
|
+
# @param name [String] The name of the package to check.
|
46
|
+
# @return [Hash] The specification for the package.
|
47
|
+
def package(name)
|
48
|
+
{"package" => name}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Specify a `bundle` to check for a {#store} SCM.
|
52
|
+
#
|
53
|
+
# @param name [String] The name of the bundle to check.
|
54
|
+
# @return [Hash] The specification for the package.
|
55
|
+
def bundle(name)
|
56
|
+
{"bundle" => name}
|
57
|
+
end
|
58
|
+
|
59
|
+
# @!endgroup
|
60
|
+
|
17
61
|
end
|
18
62
|
end
|
19
63
|
end
|
@@ -17,7 +17,7 @@ module Jujube
|
|
17
17
|
# Specify a `pollurl` trigger for a job.
|
18
18
|
#
|
19
19
|
# This trigger requires support in jenkins-job-builder that has not yet been merged.
|
20
|
-
# See {https://review.openstack.org
|
20
|
+
# See {https://review.openstack.org/83524/} for the patch.
|
21
21
|
#
|
22
22
|
# `pollurl` can poll several URLs. Each URL specification is added
|
23
23
|
# in a nested configuration block using the {#url} method.
|
data/lib/jujube/version.rb
CHANGED
data/test/components/scm_test.rb
CHANGED
@@ -8,4 +8,18 @@ class ScmTest < Minitest::Test
|
|
8
8
|
actual = git(url: "URL", branches: %w{master dev}, wipe_workspace: false)
|
9
9
|
assert_equal(expected, actual)
|
10
10
|
end
|
11
|
+
|
12
|
+
def test_store
|
13
|
+
expected = {"store" =>
|
14
|
+
{
|
15
|
+
"script" => "SCRIPT",
|
16
|
+
"repository" => "REPO",
|
17
|
+
"pundles" => [{"package" => "PACKAGE"}, {"bundle" => "BUNDLE"}]
|
18
|
+
}
|
19
|
+
}
|
20
|
+
actual = store(script: "SCRIPT", repository: "REPO") do |pundles|
|
21
|
+
pundles << package("PACKAGE") << bundle("BUNDLE")
|
22
|
+
end
|
23
|
+
assert_equal(expected, actual)
|
24
|
+
end
|
11
25
|
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.5.
|
4
|
+
version: 0.5.1
|
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-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|