diff options
author | Jeremiah Snapp <jeremiah@chef.io> | 2019-04-05 14:54:03 -0400 |
---|---|---|
committer | Jeremiah Snapp <jeremiah@chef.io> | 2019-04-05 14:54:03 -0400 |
commit | 67162eec87355c96638ea48fa964b30860c879ff (patch) | |
tree | 5e4bd3a7b98af43df88b33ae5ee3f562656d51af /omnibus/omnibus-test.sh | |
parent | 68aee212e9006f1b36b900ef83cacf6272dc2c89 (diff) | |
download | chef-67162eec87355c96638ea48fa964b30860c879ff.tar.gz |
Create omnibus buildkite pipelines
Signed-off-by: Jeremiah Snapp <jeremiah@chef.io>
Diffstat (limited to 'omnibus/omnibus-test.sh')
-rw-r--r-- | omnibus/omnibus-test.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/omnibus/omnibus-test.sh b/omnibus/omnibus-test.sh new file mode 100644 index 0000000000..981dc808f0 --- /dev/null +++ b/omnibus/omnibus-test.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -ueo pipefail + +channel="${CHANNEL:-unstable}" +product="${PRODUCT:-chef}" +version="${VERSION:-latest}" + +echo "--- Installing $channel $product $version" +package_file="$(install-omnibus-product -c "$channel" -P "$product" -v "$version" | tail -n 1)" + +echo "--- Verifying omnibus package is signed" +check-omnibus-package-signed "$package_file" + +echo "--- Testing $channel $product $version" + +export INSTALL_DIR=/opt/chef +export PATH="/opt/chef/bin:$PATH" + +echo "Verifying ownership of package files" + +NONROOT_FILES="$(find "$INSTALL_DIR" ! -uid 0 -print)" +if [[ "$NONROOT_FILES" == "" ]]; then + echo "Packages files are owned by root. Continuing verification." +else + echo "Exiting with an error because the following files are not owned by root:" + echo "$NONROOT_FILES" + exit 1 +fi + +echo "Running verification for $product" + +sh ci/verify-chef.sh |