mixlib-install 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -9
- data/CHANGELOG.md +3 -0
- data/README.md +2 -0
- data/ci/before-script.sh +12 -8
- data/ci/script.sh +17 -0
- data/lib/mixlib/install/generator/bourne.rb +8 -2
- data/lib/mixlib/install/generator/powershell.rb +8 -2
- data/lib/mixlib/install/version.rb +1 -1
- data/support/install_command.ps1 +3 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6521f3678f0d1b61776fd15ed97211bb9a218ba4
|
4
|
+
data.tar.gz: ff8d551119e27d84087e4b69c129a0aab47bfff5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e897cdb1dd20f149d2c6949a8df21b974baea1baf837cc76ed540530c11d199dbaf22998b05a3b7ed5da58799a32fa584ecb3dd08db5e4ac7a8454f79a6d84e
|
7
|
+
data.tar.gz: 9c8c72d0d7fa09dea9e64ff6524758af09fd41238080b8afcf7f190ee0c4eaf1af973754b5ba72c4232bdf5354872a1eac54e58ca3c58974836fbfa583459f22
|
data/.travis.yml
CHANGED
@@ -21,15 +21,7 @@ before_script:
|
|
21
21
|
- export PATH="$PWD/bin:$PATH"
|
22
22
|
|
23
23
|
script:
|
24
|
-
|
25
|
-
- /opt/chefdk/embedded/bin/bundle install && /opt/chefdk/bin/chef exec rake
|
26
|
-
# setup acceptance tests
|
27
|
-
- cd acceptance && export BUNDLE_GEMFILE=$PWD/Gemfile && /opt/chefdk/embedded/bin/bundle install && export APPBUNDLER_ALLOW_RVM=true
|
28
|
-
# run acceptances tests and force cleanup
|
29
|
-
# only testing bourne until issues with powershell suite resovled:
|
30
|
-
# 1) inspec not finding chef package once connected (not reproducible locally)
|
31
|
-
# 2) currently no way to mask password (sensitive true) AND know what the error is if inspec fails
|
32
|
-
- /opt/chefdk/embedded/bin/bundle exec chef-acceptance test bourne --force-destroy
|
24
|
+
- ci/script.sh
|
33
25
|
|
34
26
|
env:
|
35
27
|
global:
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/ci/before-script.sh
CHANGED
@@ -19,13 +19,17 @@ do
|
|
19
19
|
unset $ruby_env_var
|
20
20
|
done
|
21
21
|
|
22
|
-
#
|
23
|
-
|
22
|
+
# Don't run acceptance tests on forks. The decryption keys are not available.
|
23
|
+
if [ "${TRAVIS_REPO_SLUG}" = "chef/mixlib-install" ]; then
|
24
24
|
|
25
|
-
#
|
26
|
-
|
25
|
+
# download terraform
|
26
|
+
wget "https://releases.hashicorp.com/terraform/0.7.4/terraform_0.7.4_linux_amd64.zip"
|
27
27
|
|
28
|
-
#
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
# inflate archive
|
29
|
+
unzip terraform_0.7.4_linux_amd64.zip -d bin
|
30
|
+
|
31
|
+
# decrypt pem
|
32
|
+
openssl aes-256-cbc -K $encrypted_e2edbb28e76c_key -iv $encrypted_e2edbb28e76c_iv -in ci/es-infrastructure.pem.enc -out es-infrastructure.pem -d
|
33
|
+
mkdir -p ~/.ssh
|
34
|
+
mv es-infrastructure.pem ~/.ssh
|
35
|
+
fi
|
data/ci/script.sh
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -evx
|
4
|
+
|
5
|
+
# run unit tests
|
6
|
+
/opt/chefdk/embedded/bin/bundle install && /opt/chefdk/bin/chef exec rake
|
7
|
+
|
8
|
+
# Don't run acceptance tests on forks. The decryption keys are not available.
|
9
|
+
if [ "${TRAVIS_REPO_SLUG}" = "chef/mixlib-install" ]; then
|
10
|
+
# setup acceptance tests
|
11
|
+
cd acceptance && export BUNDLE_GEMFILE=$PWD/Gemfile && /opt/chefdk/embedded/bin/bundle install && export APPBUNDLER_ALLOW_RVM=true
|
12
|
+
# run acceptances tests and force cleanup
|
13
|
+
# only testing bourne until issues with powershell suite resovled:
|
14
|
+
# 1) inspec not finding chef package once connected (not reproducible locally)
|
15
|
+
# 2) currently no way to mask password (sensitive true) AND know what the error is if inspec fails
|
16
|
+
/opt/chefdk/embedded/bin/bundle exec chef-acceptance test bourne --force-destroy
|
17
|
+
fi
|
@@ -45,8 +45,14 @@ module Mixlib
|
|
45
45
|
install_command << get_script("helpers.sh")
|
46
46
|
install_command << render_variables
|
47
47
|
install_command << get_script("platform_detection.sh")
|
48
|
-
|
49
|
-
|
48
|
+
# TODO: Remove this condition check once the PackageRouter changes for
|
49
|
+
# omnitruck are delivered to production! For now, we will allow
|
50
|
+
# unstable channel requests to omnitruck to use the acceptance environment.
|
51
|
+
if options.channel == :unstable
|
52
|
+
install_command << get_script("fetch_metadata.sh", base_url: "https://omnitruck-acceptance.chef.io/")
|
53
|
+
else
|
54
|
+
install_command << get_script("fetch_metadata.sh")
|
55
|
+
end
|
50
56
|
install_command << get_script("install_package.sh")
|
51
57
|
|
52
58
|
install_command.join("\n\n")
|
@@ -46,9 +46,15 @@ module Mixlib
|
|
46
46
|
def install_command
|
47
47
|
install_project_module = []
|
48
48
|
install_project_module << get_script("helpers.ps1")
|
49
|
-
|
49
|
+
# TODO: Remove this condition check once the PackageRouter changes for
|
50
|
+
# omnitruck are delivered to production! For now, we will allow
|
51
|
+
# unstable channel requests to omnitruck to use the acceptance environment.
|
52
|
+
if options.channel == :unstable
|
53
|
+
install_project_module << get_script("get_project_metadata.ps1", base_url: "https://omnitruck-acceptance.chef.io/")
|
54
|
+
else
|
55
|
+
install_project_module << get_script("get_project_metadata.ps1")
|
56
|
+
end
|
50
57
|
install_project_module << get_script("install_project.ps1")
|
51
|
-
|
52
58
|
install_command = []
|
53
59
|
install_command << ps1_modularize(install_project_module.join("\n"), "Omnitruck")
|
54
60
|
install_command << render_command
|
data/support/install_command.ps1
CHANGED
@@ -102,7 +102,7 @@ Function Install-ChefAppx($appx, $chef_omnibus_root) {
|
|
102
102
|
return $true
|
103
103
|
}
|
104
104
|
|
105
|
-
Function Log($m) { Write-Host " $m
|
105
|
+
Function Log($m) { Write-Host " $m" }
|
106
106
|
|
107
107
|
function Get-WebContent {
|
108
108
|
param ($uri, $filepath)
|
@@ -178,7 +178,7 @@ Function Unresolve-Path($p) {
|
|
178
178
|
$chef_omnibus_root = Unresolve-Path $chef_omnibus_root
|
179
179
|
|
180
180
|
if (Check-UpdateChef $chef_omnibus_root $version) {
|
181
|
-
Write-Host "-----> Installing Chef Omnibus ($pretty_version)
|
181
|
+
Write-Host "-----> Installing Chef Omnibus ($pretty_version)"
|
182
182
|
if ($chef_metadata_url -ne $null) {
|
183
183
|
$url, $sha256 = Get-ChefMetadata "$chef_metadata_url"
|
184
184
|
} else {
|
@@ -190,5 +190,5 @@ if (Check-UpdateChef $chef_omnibus_root $version) {
|
|
190
190
|
Download-Chef "$url" $sha256 $msi
|
191
191
|
Install-Chef $msi $chef_omnibus_root
|
192
192
|
} else {
|
193
|
-
Write-Host "-----> Chef Omnibus installation detected ($pretty_version)
|
193
|
+
Write-Host "-----> Chef Omnibus installation detected ($pretty_version)"
|
194
194
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mixlib-install
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thom May
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-09-
|
12
|
+
date: 2016-09-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: artifactory
|
@@ -221,6 +221,7 @@ files:
|
|
221
221
|
- acceptance/powershell/terraform/variables.tf
|
222
222
|
- ci/before-script.sh
|
223
223
|
- ci/es-infrastructure.pem.enc
|
224
|
+
- ci/script.sh
|
224
225
|
- lib/mixlib/install.rb
|
225
226
|
- lib/mixlib/install/artifact_info.rb
|
226
227
|
- lib/mixlib/install/backend.rb
|