Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2092 from chef/lcg/fix-verify-license
Browse files Browse the repository at this point in the history
Accept the license in CI and remove old acceptance tests
  • Loading branch information
lamont-granquist authored May 17, 2019
2 parents 86574b9 + aa126a0 commit 9199a4a
Showing 1 changed file with 6 additions and 34 deletions.
40 changes: 6 additions & 34 deletions ci/verify-chefdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,10 @@ do
unset $ruby_env_var
done

# ACCEPTANCE environment variable will be set on acceptance testers.
# If is it set; we run the acceptance tests, otherwise run rspec tests.
if [ "x$ACCEPTANCE" != "x" ]; then
export PATH=/opt/chefdk/bin:/opt/chefdk/embedded/bin:$PATH
export CHEF_LICENSE="accept-no-persist"
export CHEF_LICENSE="accept-no-persist"
export PATH=/opt/chefdk/bin:$PATH

# Don't run the chef acceptance tests in chef-dk (until rainbow gem debacle is over)
# for GEM_NAME in chef chef-dk
for GEM_NAME in chef-dk
do

# copy acceptance suites into workspace
SUITE_PATH=$WORKSPACE/acceptance-$GEM_NAME
mkdir -p $SUITE_PATH
cp -R /opt/chefdk/embedded/lib/ruby/gems/*/gems/$GEM_NAME-[0-9]*/acceptance/. $SUITE_PATH
sudo chown -R $USER:$USER $SUITE_PATH

cd $SUITE_PATH

case "$GEM_NAME" in
chef) SUITE_NAMES="top-cookbooks" ;;
*) SUITE_NAMES="" ;;
esac

env PATH=$PATH AWS_SSH_KEY_ID=$AWS_SSH_KEY_ID bundle install --deployment
env KITCHEN_CHEF_PRODUCT=chefdk KITCHEN_CHEF_WIN_ARCHITECTURE=i386 PATH=$PATH AWS_SSH_KEY_ID=$AWS_SSH_KEY_ID KITCHEN_DRIVER=ec2 KITCHEN_CHEF_CHANNEL=unstable bundle exec chef-acceptance test $SUITE_NAMES --force-destroy --data-path $WORKSPACE/chef-acceptance-data/$GEM_NAME
done
else
export PATH=/opt/chefdk/bin:$PATH

# This has to be the last thing we run so that we return the correct exit code
# to the Ci system. delivery-cli tests will cause a panic on some platforms
# unless we set the terminal colors just right
sudo TERM=xterm-256color CHEF_FIPS="" chef verify --unit
fi
# This has to be the last thing we run so that we return the correct exit code
# to the Ci system. delivery-cli tests will cause a panic on some platforms
# unless we set the terminal colors just right
sudo TERM=xterm-256color CHEF_FIPS="" chef verify --unit

0 comments on commit 9199a4a

Please sign in to comment.