sambot 0.1.196 → 0.1.197

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: 581f159fe2779f6d996935ee20eef1b9678b13ed
4
- data.tar.gz: 575c18ee2a971e8a58dd23413b06397f4b297bc1
3
+ metadata.gz: ffe1d989549a35f6166b856dc83ff30d536e42c6
4
+ data.tar.gz: 0cf41173f56f4adcfb88329d9ed58678a69c4d24
5
5
  SHA512:
6
- metadata.gz: 984b69a253c225a5d6bb4e1aaad7906f7a510f29ae842229ec5b1703e7ab10e9aa02f6225ea4bcaf83307df035f5fecd94d9c3a89f4e5e9f7af738de854fd128
7
- data.tar.gz: 3d1f6fe86c20ac5b40bde2673b5a66709bb7087578ccd919cbbe185670e016be0ad8446b3c824edc316455c08eccee48be75fcd12137e78c9b4edaa4ebb368cc
6
+ metadata.gz: 643275e2af3e518eedcbd2d08a873de7454809c24c04c577968c18c625afaa49cb14c24b51acbfff28f97f2d6a4f4387601144f76d26ade1c75ed788f36df378
7
+ data.tar.gz: eb1b4bcafa4fa4718b9672d4281b4e6d172bd42397fafd3083196c0bfc1f58addb81b2d2c922e598808e99be275c179b165398a68adcb80d31ae4e3fc0728bba
@@ -101,7 +101,7 @@ Vagrant.configure("2") do |c|
101
101
  <% if config[:box] =~ /centos/ %>
102
102
  c.vm.provision "shell", inline: "bash /vagrant/bootstrap.sh \"<%= token %>\""
103
103
  <% else %>
104
- c.vm.provision "shell", inline: "powershell -ExecutionPolicy Bypass -File C:/Vagrant/bootstrap.ps1"
104
+ c.vm.provision "shell", inline: "powershell -ExecutionPolicy Bypass -File C:/Vagrant/bootstrap.ps1 -Token '<%= token %>'"
105
105
  <% end %>
106
106
 
107
107
  c.vm.provider "virtualbox" do |p|
@@ -1,3 +1,7 @@
1
+ param(
2
+ [string]$Token
3
+ )
4
+
1
5
  #################################################################################
2
6
  # PROVISIONING A WINDOWS BOX #
3
7
  #################################################################################
@@ -17,12 +21,6 @@
17
21
  # #
18
22
  # The periodic running of this task is managed by the as-vault-token cookbook. #
19
23
  # #
20
- # When testing a cookbook using the 'sidecar' method this periodic renewal #
21
- # along with the added security provided by the wrapper token is not required #
22
- # given the Vault instance is located on the test instance. #
23
- # #
24
- # The token used by the test instance is therefore simply the root token and #
25
- # no unwrapping takes place. #
26
24
  # #
27
25
  #################################################################################
28
26
 
@@ -30,8 +28,7 @@
30
28
  # Miscellaneous Windows configuration. #
31
29
  #################################################################################
32
30
 
33
- $env:VAULT_ADDR="http://127.0.0.1:8200"
34
- $env:VAULT_TOKEN="root"
31
+ $env:VAULT_ADDR="http://10.0.2.2:8200"
35
32
 
36
33
  Add-Type -AssemblyName "System.IO.Compression.FileSystem"
37
34
  [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
@@ -48,22 +45,6 @@ $zipfile = "$output\$($url.Split('/')[-1])"
48
45
  $wc.DownloadFile($url, "$zipfile")
49
46
  [System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $output)
50
47
 
51
- #################################################################################
52
- # Install Advertising Studio's as-vault-tool binary. #
53
- #################################################################################
54
-
55
- $url = "https://storage.googleapis.com/ads-devops-chef/as-vault-tool/1.0.2/windows_amd64.zip"
56
- $zipfile = "$output\$($url.Split('/')[-1])"
57
- $wc.DownloadFile($url, $zipfile)
58
- [System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $output)
59
-
60
- #################################################################################
61
- #################################################################################
62
- # Everything above this marker in pre-installed on the #
63
- # adstudio/windows-provisioned/v* boxes. #
64
- #################################################################################
65
- #################################################################################
66
-
67
48
  #################################################################################
68
49
  # Create the tokens.json file containing the Vault access token. #
69
50
  #################################################################################
@@ -73,7 +54,7 @@ $json = @"
73
54
  "vault-addr": "$env:VAULT_ADDR",
74
55
  "skip-verify": true,
75
56
  "wrapped": "",
76
- "access": "$env:VAULT_TOKEN"
57
+ "access": "$Token"
77
58
  }
78
59
  "@
79
60
 
@@ -84,11 +65,3 @@ Set-Content -Path 'C:\ProgramData\vault\tokens.json' -Value $json
84
65
  # Create the 'vault-tokens' group so other services/applications apart from #
85
66
  # 'root' can access the file. #
86
67
  #################################################################################
87
-
88
- XXXXX
89
-
90
- #################################################################################
91
- # Populate Vault with test secrets using the Chef embedded Ruby. #
92
- #################################################################################
93
-
94
- XXXXX
@@ -91,9 +91,3 @@ Set-Content -Path 'C:\ProgramData\vault\tokens.json' -Value $json
91
91
  #################################################################################
92
92
 
93
93
  & "$output\as-vault-tool" tokenrenew
94
-
95
- #################################################################################
96
- # Populate Vault with test secrets using the Chef embedded Ruby. #
97
- #################################################################################
98
-
99
- XXXXX
@@ -1,5 +1,29 @@
1
1
  #!/bin/sh
2
+
3
+ #################################################################################
4
+ # Build the cookbook, lint it and then clean it before pushing changes. #
5
+ # Fail pushing if there are any errors. #
6
+ #################################################################################
2
7
  chef exec sambot build --local
8
+ if [ $? -ne 0 ]; then
9
+ echo "Failed to build the cookbook. Aborting the Git push."
10
+ exit 1
11
+ fi
12
+
3
13
  chef exec foodcritic .
14
+ if [ $? -ne 0 ]; then
15
+ echo "Failed when running Foodcritic. Aborting the Git push."
16
+ exit 1
17
+ fi
18
+
4
19
  chef exec cookstyle .
20
+ if [ $? -ne 0 ]; then
21
+ echo "Failed when running Cookstyle. Aborting the Git push."
22
+ exit 1
23
+ fi
24
+
5
25
  chef exec sambot clean
26
+ if [ $? -ne 0 ]; then
27
+ echo "Failed when cleaning the cookbook. Aborting the Git push."
28
+ exit 1
29
+ fi
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sambot
4
- VERSION = '0.1.196'
4
+ VERSION = '0.1.197'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sambot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.196
4
+ version: 0.1.197
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Kouame