reagan 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/bin/reagan +7 -3
- data/lib/reagan.rb +1 -1
- data/lib/test_knife.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 595b4ab40fd53bd6edbacf0973d37684775097f0
|
4
|
+
data.tar.gz: 6dc4f438d84176c5aada6fc746de42e45d3b26c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab321ce160654cd5966e23ea2823b2ab0de6c72cf62cce006cca1cba12561f28ce35344182e7f3b266dca8ac85f76f2f8b1f9dfe8ef831c87c657982c7dfeb3c
|
7
|
+
data.tar.gz: 674c59378f7b64875394010b9c58c04aa2f8804d1558f145c4e43636dffb227d326176851a585ba50fe6b4caa3273237df8e9d95251238c1401a7049efb87c89
|
data/README.md
CHANGED
@@ -10,3 +10,13 @@ Trust But Verify - Ruby Jenkins build script that automates the testing of Chef
|
|
10
10
|
* octokit
|
11
11
|
* chef
|
12
12
|
* reidley
|
13
|
+
|
14
|
+
## Running Locally
|
15
|
+
While this app is written to be run as a Jenkins job it can also be run locally. This is particularly useful when you want to run the tests prior to commit. To run Reagan locally use the following command line options:
|
16
|
+
|
17
|
+
* -c /path/to/reagan.yml
|
18
|
+
* -o overide,list,of,comma,separated,cookbooks
|
19
|
+
* -p 123 pull request number to manually test
|
20
|
+
|
21
|
+
##Running in Jenkins
|
22
|
+
coming soon!
|
data/bin/reagan
CHANGED
@@ -22,18 +22,22 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
22
22
|
require 'reagan'
|
23
23
|
require 'optparse'
|
24
24
|
|
25
|
-
options = { :pull => nil, :cookbooks => nil }
|
25
|
+
options = { :pull => nil, :cookbooks => nil, :config => '/etc/reagan.yml' }
|
26
26
|
|
27
27
|
parser = OptionParser.new do |opts|
|
28
28
|
opts.banner = 'Usage: reagan [options]'
|
29
|
-
opts.on('-
|
29
|
+
opts.on('-o', '--override cb1,cb2', 'Comma separated list of cookbooks to test') do |cookbooks|
|
30
30
|
options[:cookbooks] = cookbooks
|
31
31
|
end
|
32
32
|
|
33
|
-
opts.on('-p', '--pull_num
|
33
|
+
opts.on('-p', '--pull_num 123', 'Github pull number to test') do |pull|
|
34
34
|
options[:pull] = pull
|
35
35
|
end
|
36
36
|
|
37
|
+
opts.on('-c', '--config reagan.yml', 'Path to config file (defaults to /etc/reagan.yml)') do |config|
|
38
|
+
options[:config] = config
|
39
|
+
end
|
40
|
+
|
37
41
|
opts.on('-h', '--help', 'Displays Help') do
|
38
42
|
puts opts
|
39
43
|
exit
|
data/lib/reagan.rb
CHANGED
data/lib/test_knife.rb
CHANGED
@@ -29,7 +29,7 @@ class TestKnife < Reagan
|
|
29
29
|
result = system "knife cookbook test -o #{File.join(@@config['jenkins']['workspace_dir'], 'cookbooks')} #{@cookbook} > /dev/null 2>&1"
|
30
30
|
|
31
31
|
puts 'Running knife cookbook test:'
|
32
|
-
puts result ? ' PASS: Knife cookbook test was successful' : 'FAIL: Knife cookbookk test was NOT successful'
|
32
|
+
puts result ? ' PASS: Knife cookbook test was successful' : ' FAIL: Knife cookbookk test was NOT successful'
|
33
33
|
result
|
34
34
|
end
|
35
35
|
end
|