add ssh package and push to branch before notifying (#7517)

This commit is contained in:
Alvin Huang 2020-03-26 15:23:31 -04:00 committed by GitHub
parent b29170201d
commit ce81e026de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -597,7 +597,7 @@ jobs:
docker:
- image: alpine:3.11
steps:
- run: apk add --no-cache --no-progress git bash curl ncurses jq
- run: apk add --no-cache --no-progress git bash curl ncurses jq openssh-client
- checkout
- add_ssh_keys: # needs a key to push cherry-picked commits back to github
fingerprints:

View File

@ -50,6 +50,8 @@ function cherry_pick_with_slack_notification {
# Else we send a success notification
else
status "🍒✅ Cherry picking of PR commit ${commit:0:7} from $pr_url succeeded!"
# push changes to the specified branch
git push origin "$branch"
curl -X POST -H 'Content-type: application/json' \
--data \
"{ \
@ -103,12 +105,10 @@ for label in $labels; do
status "backporting to stable-website"
branch="stable-website"
cherry_pick_with_slack_notification "$branch" "$CIRCLE_SHA1" "$pr_url"
git push origin stable-website
# else if the label matches backport/*, it will attempt to cherry-pick to the release branch
elif [[ $label =~ backport/* ]]; then
status "backporting to $label"
branch="${label/backport/release}.x"
cherry_pick_with_slack_notification "$branch" "$CIRCLE_SHA1" "$pr_url"
git push origin "$branch"
fi
done