diff --git a/omnibus/omnibus-test.ps1 b/omnibus/omnibus-test.ps1 index fc67b4e4a..04684fd42 100644 --- a/omnibus/omnibus-test.ps1 +++ b/omnibus/omnibus-test.ps1 @@ -10,8 +10,17 @@ If ([string]::IsNullOrEmpty($product)) { $product = "inspec" } $version = "$Env:VERSION" If ([string]::IsNullOrEmpty($version)) { $version = "latest" } +. C:\buildkite-agent\bin\load-omnibus-toolchain.ps1 + +If ($env:OMNIBUS_WINDOWS_ARCH -eq "x86") { + $architecture = "i386" +} +ElseIf ($env:OMNIBUS_WINDOWS_ARCH -eq "x64") { + $architecture = "x86_64" +} + Write-Output "--- Downloading $channel $product $version" -$download_url = C:\opscode\omnibus-toolchain\embedded\bin\mixlib-install.bat download --url --channel "$channel" "$product" --version "$version" +$download_url = C:\opscode\omnibus-toolchain\embedded\bin\mixlib-install.bat download --url --channel "$channel" "$product" --version "$version" --architecture "$architecture" $package_file = "$Env:Temp\$(Split-Path -Path $download_url -Leaf)" Invoke-WebRequest -OutFile "$package_file" -Uri "$download_url" @@ -27,9 +36,7 @@ Else { Write-Output "--- Installing $channel $product $version" Start-Process "$package_file" /quiet -Wait -Write-Output "--- Testing $channel $product $version" - -Write-Output "Running verification for $product" +Write-Output "--- Running verification for $channel $product $version" # reload Env:PATH to ensure it gets any changes that the install made (e.g. C:\opscode\inspec\bin\ ) $Env:PATH = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User") diff --git a/omnibus/omnibus-test.sh b/omnibus/omnibus-test.sh index c01d3f91b..5e7e0eb61 100644 --- a/omnibus/omnibus-test.sh +++ b/omnibus/omnibus-test.sh @@ -11,9 +11,7 @@ package_file="$(install-omnibus-product -c "$channel" -P "$product" -v "$version echo "--- Verifying omnibus package is signed" check-omnibus-package-signed "$package_file" -echo "--- Testing $channel $product $version" - -echo "Verifying ownership of package files" +echo "--- Verifying ownership of package files" export INSTALL_DIR=/opt/inspec NONROOT_FILES="$(find "$INSTALL_DIR" ! -uid 0 -print)" @@ -25,7 +23,7 @@ else exit 1 fi -echo "Running verification for $product" +echo "--- Running verification for $channel $product $version" # Set GEM_HOME and GEM_PATH to verify our appbundle inspec shim is correctly # removing them from the environment while launching from our embedded ruby.