summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremiah Snapp <jeremiah@chef.io>2019-06-21 12:55:09 -0400
committerJeremiah Snapp <jeremiah@chef.io>2019-06-21 14:52:55 -0400
commite77b1bc07a4749a0bb47e3ecdbf4bb8aef630c63 (patch)
tree093d2a0e71e34f9910fc885bbb0b80cbfcfbe66d
parent1d46bef432d29f94eeea328990a4e123a63ce81f (diff)
downloadchef-snappj/make-omnibus-test.sh-use-appropriate-toolchain.tar.gz
Make omnibus-test.sh use appropriate toolchainsnappj/make-omnibus-test.sh-use-appropriate-toolchain
Signed-off-by: Jeremiah Snapp <jeremiah@chef.io>
-rw-r--r--.expeditor/release.omnibus.yml1
-rw-r--r--omnibus/omnibus-test.sh8
2 files changed, 6 insertions, 3 deletions
diff --git a/.expeditor/release.omnibus.yml b/.expeditor/release.omnibus.yml
index edd03f7bf0..f042be94bc 100644
--- a/.expeditor/release.omnibus.yml
+++ b/.expeditor/release.omnibus.yml
@@ -3,6 +3,7 @@ project-name: chef
config: omnibus/omnibus.rb
test-path: omnibus/omnibus-test.sh
test-path-windows: omnibus/omnibus-test.ps1
+test-channel: stable
fips-platforms:
- el-*-x86_64
- windows-*
diff --git a/omnibus/omnibus-test.sh b/omnibus/omnibus-test.sh
index b6e740dee6..4b5ca82895 100644
--- a/omnibus/omnibus-test.sh
+++ b/omnibus/omnibus-test.sh
@@ -8,10 +8,10 @@ version="${VERSION:-latest}"
export INSTALL_DIR="/opt/$product"
echo "--- Installing $channel $product $version"
-package_file="$(/opt/omnibus-toolchain/bin/install-omnibus-product -c "$channel" -P "$product" -v "$version" | tail -n 1)"
+package_file="$("/opt/$TOOLCHAIN/bin/install-omnibus-product" -c "$channel" -P "$product" -v "$version" | tail -1)"
echo "--- Verifying omnibus package is signed"
-/opt/omnibus-toolchain/bin/check-omnibus-package-signed "$package_file"
+"/opt/$TOOLCHAIN/bin/check-omnibus-package-signed" "$package_file"
sudo rm -f "$package_file"
@@ -110,7 +110,7 @@ export FORCE_FFI_YAJL
# most platforms provide "infocmp" by default via an "ncurses" package but SLES 11 and 12 provide it via "ncurses-devel" which
# isn't typically installed. omnibus-toolchain has "infocmp" built-in so we add omnibus-toolchain to the PATH to ensure
# tests will function properly.
-PATH="/opt/omnibus-toolchain/bin:/usr/local/bin:/opt/omnibus-toolchain/embedded/bin:$PATH"
+PATH="/opt/$TOOLCHAIN/bin:/usr/local/bin:/opt/$TOOLCHAIN/embedded/bin:$PATH"
# add chef's bin paths to PATH to ensure tests function properly
PATH="/opt/$product/bin:/opt/$product/embedded/bin:$PATH"
@@ -122,8 +122,10 @@ chef_gem="$(dirname "$lib_dir")"
# ensure that PATH doesn't get reset by sudoers
if [[ -d /etc/sudoers.d ]]; then
echo "Defaults:$(id -un) !secure_path, exempt_group += $(id -gn)" | sudo tee "/etc/sudoers.d/$(id -un)-preserve_path"
+ sudo chmod 440 "/etc/sudoers.d/$(id -un)-preserve_path"
elif [[ -d /usr/local/etc/sudoers.d ]]; then
echo "Defaults:$(id -un) !secure_path, exempt_group += $(id -gn)" | sudo tee "/usr/local/etc/sudoers.d/$(id -un)-preserve_path"
+ sudo chmod 440 "/usr/local/etc/sudoers.d/$(id -un)-preserve_path"
fi
cd "$chef_gem"