ansible_spec_plus 1.0.1 → 1.0.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Jenkinsfile +35 -26
- data/ansible_spec_plus.gemspec +1 -1
- data/lib/ansible_spec_plus.rb +5 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 377062b21843a515e20880f39cefbdad88a0626c
|
4
|
+
data.tar.gz: 8ad1914bd8d0f6c09c3b1fb0c9bfa54e51ec876d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38c6af0f85046664bb1b59048bf599e8260f71f162022ec0566d1fb4226a3b0a42ca9de392f30afd24e0d4b450ca4eb6cfe95436883543f11d12a943fd262421
|
7
|
+
data.tar.gz: 9d57dc9e29140f9a17600020dbc80f971bbccd0c54665b553af6f13a6a409d1c967d95159d9f9b811d82ba50a57304db687a5c2433af5218b5f1394e03d0fb59
|
data/Jenkinsfile
CHANGED
@@ -16,7 +16,12 @@ node('master') {
|
|
16
16
|
|
17
17
|
stage('Version') {
|
18
18
|
|
19
|
-
|
19
|
+
VERSION = sh (
|
20
|
+
script: 'cat ansible_spec_plus.gemspec | grep gem.version | grep -Po "\\d+.\\d+.\\d+" | sed "s/[0-9]*\$/\${BUILD_NUMBER}/g"',
|
21
|
+
returnStdout: true
|
22
|
+
).trim()
|
23
|
+
|
24
|
+
sh "sed -i 's/^ gem.version.*/ gem.version = \"${VERSION}\"/g' ansible_spec_plus.gemspec"
|
20
25
|
|
21
26
|
}
|
22
27
|
|
@@ -27,30 +32,34 @@ node('master') {
|
|
27
32
|
}
|
28
33
|
|
29
34
|
stage('Release') {
|
35
|
+
VERSION = sh (
|
36
|
+
script: 'cat ansible_spec_plus.gemspec | grep gem.version | grep -Po "\\d+.\\d+.\\d+" | sed "s/[0-9]*\$/\${BUILD_NUMBER}/g"',
|
37
|
+
returnStdout: true
|
38
|
+
).trim()
|
30
39
|
|
31
|
-
sh ""
|
40
|
+
sh "gem push ansible_spec_plus-${VERSION}.gem"
|
32
41
|
|
33
42
|
}
|
34
43
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
44
|
+
stage('Notification') {
|
45
|
+
|
46
|
+
GIT_AUTHOR = sh (
|
47
|
+
script: 'git --no-pager show -s --format="%an <%ae>" HEAD',
|
48
|
+
returnStdout: true
|
49
|
+
).trim()
|
50
|
+
|
51
|
+
GIT_COMMIT_MESSAGE = sh (
|
52
|
+
script: 'git --no-pager show -s --format="%s" HEAD',
|
53
|
+
returnStdout: true
|
54
|
+
).trim()
|
55
|
+
|
56
|
+
mail body: "${GIT_AUTHOR} hat erfolgreich das Gem 'ansible_spec_plus' released.\n\n${GIT_COMMIT_MESSAGE}\n\nSiehe ${env.BUILD_URL}",
|
57
|
+
from: 'jenkins@consort-it.de',
|
58
|
+
replyTo: 'jenkins@consort-it.de',
|
59
|
+
subject: 'ansible_spec_plus release SUCCESSFUL',
|
60
|
+
to: 'dev@consort-it.de'
|
61
|
+
|
62
|
+
}
|
54
63
|
|
55
64
|
}
|
56
65
|
|
@@ -58,11 +67,11 @@ node('master') {
|
|
58
67
|
|
59
68
|
currentBuild.result = "FAILURE"
|
60
69
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
70
|
+
mail body: "${env.BUILD_URL}",
|
71
|
+
from: 'jenkins@consort-it.de',
|
72
|
+
replyTo: 'jenkins@consort-it.de',
|
73
|
+
subject: 'ansible_spec_plus release FAILED',
|
74
|
+
to: 'dev@consort-it.de'
|
66
75
|
|
67
76
|
throw err
|
68
77
|
|
data/ansible_spec_plus.gemspec
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
Gem::Specification.new do |gem|
|
7
7
|
gem.name = "ansible_spec_plus"
|
8
8
|
gem.date = Time.now.strftime("%Y-%m-%d")
|
9
|
-
gem.version = "1.0.
|
9
|
+
gem.version = "1.0.23"
|
10
10
|
gem.authors = ["Meik Minks"]
|
11
11
|
gem.email = ["mminks@inoxio.de"]
|
12
12
|
gem.description = %q{Ansible Config Parser for Serverspec to test roles, hosts and playbooks. Providing test coverage.}
|
data/lib/ansible_spec_plus.rb
CHANGED
@@ -315,8 +315,8 @@ class AnsibleSpecPlus
|
|
315
315
|
def load_role_resources(name)
|
316
316
|
resources = []
|
317
317
|
|
318
|
-
Dir.chdir(BASE_DIR) do
|
319
|
-
Dir.glob("
|
318
|
+
Dir.chdir("#{BASE_DIR}/roles/#{name}/tasks") do
|
319
|
+
Dir.glob("*.yml").each do |file|
|
320
320
|
AnsibleSpec.load_playbook(file).each do |resource|
|
321
321
|
resources << resource
|
322
322
|
end
|
@@ -594,7 +594,9 @@ class AnsibleSpecPlus
|
|
594
594
|
playbook_path = site.values[0]
|
595
595
|
|
596
596
|
AnsibleSpec.load_playbook(playbook_path).each do |playbook|
|
597
|
-
playbook['roles'].map { |role|
|
597
|
+
playbook['roles'].uniq.map { |role|
|
598
|
+
resources << load_role_resources(role)
|
599
|
+
}
|
598
600
|
end
|
599
601
|
end
|
600
602
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ansible_spec_plus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Meik Minks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
139
|
rubyforge_project:
|
140
|
-
rubygems_version: 2.5.
|
140
|
+
rubygems_version: 2.5.2
|
141
141
|
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: Ansible Config Parser for Serverspec to test roles, hosts and playbooks.
|