From ad7e5a45bba0415ef8e700b621ab458b6c7fd6a8 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Wed, 6 May 2015 17:58:36 +1000 Subject: [PATCH 1/3] Add updated merge script --- script/ci/merge_branch_to_master.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script/ci/merge_branch_to_master.sh b/script/ci/merge_branch_to_master.sh index 0bb07b43e2..6a942c2d39 100755 --- a/script/ci/merge_branch_to_master.sh +++ b/script/ci/merge_branch_to_master.sh @@ -7,4 +7,8 @@ echo "--- Verifying branch is based on current master" exit_unless_master_merged echo "--- Pushing branch" -echo git push origin $BUILDKITE_COMMIT:master +git checkout master +git merge origin/master +git merge origin/$BUILDKITE_BRANCH +git push origin master +git checkout origin/$BUILDKITE_BRANCH From f84e704d99711335dad03c295dfe4c8ee397e126 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Wed, 6 May 2015 17:59:36 +1000 Subject: [PATCH 2/3] Retry simple push-to-master script --- script/ci/merge_branch_to_master.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/script/ci/merge_branch_to_master.sh b/script/ci/merge_branch_to_master.sh index 6a942c2d39..6e40ed4ef9 100755 --- a/script/ci/merge_branch_to_master.sh +++ b/script/ci/merge_branch_to_master.sh @@ -7,8 +7,4 @@ echo "--- Verifying branch is based on current master" exit_unless_master_merged echo "--- Pushing branch" -git checkout master -git merge origin/master -git merge origin/$BUILDKITE_BRANCH -git push origin master -git checkout origin/$BUILDKITE_BRANCH +git push origin $BUILDKITE_COMMIT:master From 485eee4bddae4d4f9251eba618b913d11945f75a Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Wed, 6 May 2015 18:07:50 +1000 Subject: [PATCH 3/3] Deploy scripts display their output --- script/ci/push_to_production.sh | 4 +++- script/ci/push_to_staging.sh | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/script/ci/push_to_production.sh b/script/ci/push_to_production.sh index b731b538ca..8a8d4bf318 100755 --- a/script/ci/push_to_production.sh +++ b/script/ci/push_to_production.sh @@ -12,4 +12,6 @@ echo "--- Saving baseline data for staging" ssh ofn-staging2 "/home/openfoodweb/apps/openfoodweb/current/script/ci/save_staging_baseline.sh $BUILDKITE_COMMIT" echo "--- Pushing to production" -[[ $(git push production $BUILDKITE_COMMIT:master --force 2>&1) =~ "Done" ]] +output=$(git push production $BUILDKITE_COMMIT:master --force 2>&1) +echo $output +[[ $output =~ "Done" ]] diff --git a/script/ci/push_to_staging.sh b/script/ci/push_to_staging.sh index 582f500a76..0a5a11235a 100755 --- a/script/ci/push_to_staging.sh +++ b/script/ci/push_to_staging.sh @@ -16,4 +16,6 @@ echo "--- Loading baseline data" ssh ofn-staging2 "/home/openfoodweb/apps/openfoodweb/current/script/ci/load_staging_baseline.sh" echo "--- Pushing to staging" -[[ $(git push staging2 $BUILDKITE_COMMIT:master --force 2>&1) =~ "Done" ]] +output=$(git push staging2 $BUILDKITE_COMMIT:master --force 2>&1) +echo $output +[[ $output =~ "Done" ]]