fix: correct case where there could be multiple build containers post-build

This happens when we execute several post-release scripts.
This commit is contained in:
Jose Diaz-Gonzalez authored and GitHub committed 2019-03-14 13:12:07 -04:00
1 parent f9023402ad
commit 8dcbfe5542
1 file changed
+1 -1
+1 -1
View File
@@ -74,7 +74,7 @@ teardown() {
@test "(build-env) DOKKU_ROOT cache bind is used by default" { @test "(build-env) DOKKU_ROOT cache bind is used by default" {
deploy_app deploy_app
BUILD_CID=$(docker ps -a |grep $TEST_APP |grep /bin/bash | awk '{print $1}') BUILD_CID=$(docker ps -a | grep $TEST_APP | grep /bin/bash | awk '{print $1}' | head -n1)
run /bin/bash -c "docker inspect --format '{{ .HostConfig.Binds }}' $BUILD_CID | tr -d '[]' | cut -f1 -d:" run /bin/bash -c "docker inspect --format '{{ .HostConfig.Binds }}' $BUILD_CID | tr -d '[]' | cut -f1 -d:"
echo "output: $output" echo "output: $output"
echo "status: $status" echo "status: $status"