fix: ensure we respect DOKKU_DEPLOY_BRANCH when rebuilding applications

Closes #3021
This commit is contained in:
Jose Diaz-Gonzalez
2018-01-12 13:38:28 -05:00
parent b90bb0cd38
commit 19806636ad
2 changed files with 12 additions and 1 deletions

View File

@@ -145,7 +145,8 @@ git_build() {
if [[ $# -ge 2 ]]; then
local REF="$2"
else
local REF=$(< "$DOKKU_ROOT/$APP/refs/heads/master")
DOKKU_DEPLOY_BRANCH="$(git_deploy_branch "$APP")"
local REF=$(< "$DOKKU_ROOT/$APP/refs/heads/$DOKKU_DEPLOY_BRANCH")
fi
# shellcheck disable=SC2086

View File

@@ -153,9 +153,19 @@ teardown() {
echo "status: "$status
assert_success
run ssh dokku@dokku.me ps:rebuild $TEST_APP
echo "output: "$output
echo "status: "$status
assert_success
run ssh dokku@dokku.me config:set $TEST_APP DOKKU_DEPLOY_BRANCH=app-branch
GIT_REMOTE_BRANCH=app-branch deploy_app
echo "output: "$output
echo "status: "$status
assert_success
run ssh dokku@dokku.me ps:rebuild $TEST_APP
echo "output: "$output
echo "status: "$status
assert_success
}