add ssh package and push to branch before notifying (#7517)
This commit is contained in:
parent
b29170201d
commit
ce81e026de
|
@ -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:
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue