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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f11dca54482bc13a49343ecbe73ff603fb7351ed
4
- data.tar.gz: 87d1fe4b10b3467801909a245da33120caf36809
3
+ metadata.gz: 377062b21843a515e20880f39cefbdad88a0626c
4
+ data.tar.gz: 8ad1914bd8d0f6c09c3b1fb0c9bfa54e51ec876d
5
5
  SHA512:
6
- metadata.gz: 873d1427c8c40f3442d5a5f5bd6a1f4834e0004029edbe9b5d00fd1b7c7d66b493afa2fe4ac7a8432588f5d11951b4f7011cc9a1c01035860fceddbf99c1a41f
7
- data.tar.gz: 543bd738eb7f802b5b22121fa5ad8c1a627da485edfa432e1b660504ce5ee7adcb889860de7b1249b19cca95dad607e9e50c0cdc5f413acee860efe5f3b11189
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
- sh "sed -i 's/^ gem.version.*/ gem.version = \"1.0.${env.BUILD_NUMBER}\"/g' ansible_spec_plus.gemspec"
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
- // stage('Notification') {
36
- //
37
- // GIT_AUTHOR = sh (
38
- // script: 'git --no-pager show -s --format="%an <%ae>" HEAD',
39
- // returnStdout: true
40
- // ).trim()
41
- //
42
- // GIT_COMMIT_MESSAGE = sh (
43
- // script: 'git --no-pager show -s --format="%s" HEAD',
44
- // returnStdout: true
45
- // ).trim()
46
- //
47
- // mail body: "${GIT_AUTHOR} hat erfolgreich folgende Änderung auf http://www.consort-academy.de deployt:\n\n${GIT_COMMIT_MESSAGE}\n\nSiehe ${env.BUILD_URL}",
48
- // from: 'jenkins@consort-it.de',
49
- // replyTo: 'jenkins@consort-it.de',
50
- // subject: 'live deployment SUCCESSFUL',
51
- // to: 'dev@consort-it.de'
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
- // mail body: "${env.BUILD_URL}",
62
- // from: 'jenkins@consort-it.de',
63
- // replyTo: 'jenkins@consort-it.de',
64
- // subject: 'live deployment FAILED',
65
- // to: 'dev@consort-it.de'
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
 
@@ -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.1"
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.}
@@ -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("roles/#{name}/tasks/*.yml").each do |file|
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| resources << load_role_resources(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.1
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-04-06 00:00:00.000000000 Z
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.1
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.