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: docker:
- image: alpine:3.11 - image: alpine:3.11
steps: 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 - checkout
- add_ssh_keys: # needs a key to push cherry-picked commits back to github - add_ssh_keys: # needs a key to push cherry-picked commits back to github
fingerprints: fingerprints:

View file

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