Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integration test cancellation #1942

Merged
merged 1 commit into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .expeditor/integration_test.pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,12 @@ destroy-all () {

echo "--- Destroying all Terraform workspaces associated with build number $BUILD_NUMBER"

# verify command dependencies
[[ "$(command -v consul)" ]] || error 'consul command is not available'
# ensure consul is installed
if [[ ! "$(command -v consul)" ]]; then
asdf plugin-add consul
asdf install consul 1.6.2
asdf local consul 1.6.2
fi

# iterate across workspaces left in consul
for workspace in $(consul kv get -keys terraform/chef-server/ | sed -n "/${BUILD_NUMBER}/{s/.*:\(${BUILD_NUMBER}-.*$\)/\1/;s/\///;p;}" | sort -u); do
Expand Down
6 changes: 1 addition & 5 deletions .expeditor/integration_test.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -958,11 +958,7 @@ steps:
continue_on_failure: true

- label: ':terraform: destroy-all'
command:
- asdf plugin-add consul
- asdf install consul 1.6.2
- asdf local consul 1.6.2
- .expeditor/integration_test.pipeline.sh destroy-all
command: .expeditor/integration_test.pipeline.sh destroy-all
env:
ACTION: destroy-all
CONSUL_HTTP_ADDR: http://consul.chef.co
Expand Down