mirror of
https://github.com/inspec/inspec
synced 2024-11-21 20:23:06 +00:00
Merge pull request #5467 from inspec/nkierpiec/update-omnibus-tests
Update tests to handle local omnibus packages from Buildkite artifacts api
This commit is contained in:
commit
c3d0c30f3c
2 changed files with 17 additions and 3 deletions
|
@ -10,8 +10,17 @@ If ([string]::IsNullOrEmpty($product)) { $product = "inspec" }
|
|||
$version = "$Env:VERSION"
|
||||
If ([string]::IsNullOrEmpty($version)) { $version = "latest" }
|
||||
|
||||
Write-Output "--- Installing $channel $product $version"
|
||||
$package_file = $(C:\opscode\omnibus-toolchain\bin\install-omnibus-product.ps1 -Product "$product" -Channel "$channel" -Version "$version" | Select-Object -Last 1)
|
||||
$package_file = "$Env:PACKAGE_FILE"
|
||||
If ([string]::IsNullOrEmpty($package_file)) { $package_file = "" }
|
||||
|
||||
If ($package_file -eq "") {
|
||||
Write-Output "--- Installing $channel $product $version"
|
||||
$package_file = $(.omnibus-buildkite-plugin\install-omnibus-product.ps1 -Product "$product" -Channel "$channel" -Version "$version" | Select-Object -Last 1)
|
||||
}
|
||||
Else {
|
||||
Write-Output "--- Installing $product $version"
|
||||
$package_file = $(.omnibus-buildkite-plugin\install-omnibus-product.ps1 -Package "$package_file" -Product "$product" -Version "$version" | Select-Object -Last 1)
|
||||
}
|
||||
|
||||
Write-Output "--- Verifying omnibus package is signed"
|
||||
C:\opscode\omnibus-toolchain\bin\check-omnibus-package-signed.ps1 "$package_file"
|
||||
|
|
|
@ -4,9 +4,14 @@ set -eo pipefail
|
|||
channel="${CHANNEL:-unstable}"
|
||||
product="${PRODUCT:-inspec}"
|
||||
version="${VERSION:-latest}"
|
||||
package_file=${PACKAGE_FILE:-""}
|
||||
|
||||
echo "--- Installing $channel $product $version"
|
||||
package_file="$(/opt/omnibus-toolchain/bin/install-omnibus-product -c "$channel" -P "$product" -v "$version" | tail -n 1)"
|
||||
if [[ -z $package_file ]]; then
|
||||
package_file="$(.omnibus-buildkite-plugin/install-omnibus-product.sh -c "$channel" -P "$product" -v "$version" | tail -1)"
|
||||
else
|
||||
.omnibus-buildkite-plugin/install-omnibus-product.sh -f "$package_file" -P "$product" -v "$version" &> /dev/null
|
||||
fi
|
||||
|
||||
echo "--- Verifying omnibus package is signed"
|
||||
/opt/omnibus-toolchain/bin/check-omnibus-package-signed "$package_file"
|
||||
|
|
Loading…
Reference in a new issue