Merge pull request #3031 from dokku/3021-custom-branch-ps-rebuild

fix: ensure we respect DOKKU_DEPLOY_BRANCH when rebuilding applications
This commit is contained in:
Jose Diaz-Gonzalez authored and GitHub committed 2018-01-12 16:26:35 -05:00
commit af158d945a
2 files changed
+13 -1

No files matched your search

+3 -1
View File
@@ -142,10 +142,12 @@ git_hook_cmd() {
git_build() { git_build() {
declare desc="setup and call git_build_app_repo" declare desc="setup and call git_build_app_repo"
local APP="$1" local APP="$1"
local DOKKU_DEPLOY_BRANCH REF
if [[ $# -ge 2 ]]; then if [[ $# -ge 2 ]]; then
local REF="$2" local REF="$2"
else else
local REF=$(< "$DOKKU_ROOT/$APP/refs/heads/master") DOKKU_DEPLOY_BRANCH="$(git_deploy_branch "$APP")"
REF=$(< "$DOKKU_ROOT/$APP/refs/heads/$DOKKU_DEPLOY_BRANCH")
fi fi
# shellcheck disable=SC2086 # shellcheck disable=SC2086
+10
View File
@@ -153,9 +153,19 @@ teardown() {
echo "status: "$status echo "status: "$status
assert_success 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 run ssh dokku@dokku.me config:set $TEST_APP DOKKU_DEPLOY_BRANCH=app-branch
GIT_REMOTE_BRANCH=app-branch deploy_app GIT_REMOTE_BRANCH=app-branch deploy_app
echo "output: "$output echo "output: "$output
echo "status: "$status echo "status: "$status
assert_success assert_success
run ssh dokku@dokku.me ps:rebuild $TEST_APP
echo "output: "$output
echo "status: "$status
assert_success
} }