summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorSeth Chisamore <schisamo@chef.io>2016-05-17 09:22:51 -0400
committerSeth Chisamore <schisamo@chef.io>2016-05-17 15:30:04 -0400
commit3889b62ffdeba3d686799b020c64c48ea050ba8e (patch)
tree4122b6551ec8f75ea2ce58408adb0a2bc95e3c0f /ci
parentb8cef53989826bed36e3abca352f2e57d3cf0c22 (diff)
downloadchef-3889b62ffdeba3d686799b020c64c48ea050ba8e.tar.gz
copy chef-acceptance suites into $WORKSPACE
This will ensure the path to the suites can be fully resolved, it prevents errors like: ``` STDERR: /home/jenkins/workspace/chefdk-test/architecture/x86_64/platform/acceptance/project/chefdk/role/tester/vendor/bundle/ruby/2.1.0/gems/mixlib-shellout-2.2.6/lib/mixlib/shellout/unix.rb:183:in `chdir': No such file or directory @ dir_chdir - /home/jenkins/workspace/chefdk-test/architecture/x86_64/platform/acceptance/project/chefdk/role/tester/opscode-ci/.acceptance/acceptance-cookbook (Errno::ENOENT) ```
Diffstat (limited to 'ci')
-rwxr-xr-xci/verify-chef.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/ci/verify-chef.sh b/ci/verify-chef.sh
index 00dad02f3d..71d4afe0df 100755
--- a/ci/verify-chef.sh
+++ b/ci/verify-chef.sh
@@ -98,12 +98,14 @@ if [ "x$ACCEPTANCE" != "x" ]; then
PATH=/opt/chefdk/bin:/opt/chefdk/embedded/bin:$PATH
export PATH
- # Test against the Chef bundle
- env PATH=$PATH AWS_SSH_KEY_ID=$AWS_SSH_KEY_ID pwd
- # Force `$WORKSPACE/.bundle/config` to be created so bundler doesn't
- # attempt to create the file up in the `$CHEF_GEM/acceptance/`. This
- # saves us from having to add a `sudo` to any of the `bundle` commands.
- env PATH=$PATH AWS_SSH_KEY_ID=$AWS_SSH_KEY_ID bundle config --local gemfile $CHEF_GEM/acceptance/Gemfile
+ # copy acceptance suites into workspace
+ SUITE_PATH=$WORKSPACE/acceptance
+ mkdir -p $SUITE_PATH
+ cp -R $CHEF_GEM/acceptance/. $SUITE_PATH
+ sudo chown -R $USER:$USER $SUITE_PATH
+
+ cd $SUITE_PATH
+
env PATH=$PATH AWS_SSH_KEY_ID=$AWS_SSH_KEY_ID bundle install --deployment
env PATH=$PATH AWS_SSH_KEY_ID=$AWS_SSH_KEY_ID KITCHEN_DRIVER=ec2 KITCHEN_CHEF_CHANNEL=unstable bundle exec chef-acceptance test --force-destroy --data-path $WORKSPACE/chef-acceptance-data
else