-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15717 from wallyworld/merge-3.1-20230608
#15717 Merge 3.1 #15676 [from wallyworld/newer-clients-migrate](7c1f884) #15672 [from hpidcock/bump-juju-description-v3.0.15](acec126) #15683 [from hpidcock/fix-persistent-storage-test](460dd21) #15673 [from barrettj12/check-merge](5c253c3) #15677 [from barrettj12/invalid-offer](3cb3f8b) #15654 [from ycliuhw/fix/backendRefCount](4e5ae3c) #15692 [from wallyworld/fix-secrets-cmr](a1fb0c4) [t](840bc09) #15709 [from wallyworld/hook-secret-revison](840bc09) #15701 [from hpidcock/fix-upgrade-podspec-sidecar](d465c93) #15681 [from anvial/JUJU-3882-fix-test-deploy-test-…](f54c1ad) #15714 [from wallyworld/offer-consume=sameapp](6390036) Conflicts were upgrade steps - the 3.1.3 step has been moved to 3.2.1. Also an auth tweak to crossmodelrelaltions. ``` # Conflicts: # apiserver/common/crossmodel/auth_test.go # apiserver/facades/controller/crossmodelrelations/crossmodelrelations.go # rpc/params/apierror.go # state/upgrades.go # state/upgrades_test.go # upgrades/backend.go # ``` ## QA steps See PRs
- Loading branch information
Showing
80 changed files
with
1,464 additions
and
502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Merge | ||
on: | ||
push: | ||
branches: ['2.9', '3.1', '3.2', '3.3'] | ||
|
||
jobs: | ||
check-merge: | ||
name: Check for conflicts | ||
runs-on: ubuntu-latest | ||
env: | ||
MERGE_TARGETS: | | ||
2.9: 3.1 | ||
3.1: 3.2 | ||
3.2: 3.3 | ||
3.3: main | ||
steps: | ||
- name: Determine source/target branches | ||
id: branch | ||
run: | | ||
set -x | ||
SOURCE_BRANCH=${{ github.ref_name }} | ||
echo "source=$SOURCE_BRANCH" >> "$GITHUB_OUTPUT" | ||
TARGET_BRANCH=$(echo "$MERGE_TARGETS" | yq ".\"$SOURCE_BRANCH\"") | ||
echo "target=$TARGET_BRANCH" >> "$GITHUB_OUTPUT" | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ steps.branch.outputs.target }} | ||
|
||
- name: Attempt to merge | ||
id: merge | ||
run: | | ||
set -x | ||
# Need to set Git username/email to do the merge (yawn) | ||
git config user.name 'jujubot' | ||
git config user.email 'fake@address.me' | ||
set +e | ||
git merge origin/${{ steps.branch.outputs.source }} | ||
case $? in | ||
0) | ||
echo "conflicts=false" >> "$GITHUB_OUTPUT" | ||
;; | ||
1) | ||
echo "conflicts=true" >> "$GITHUB_OUTPUT" | ||
;; | ||
*) | ||
exit $? | ||
;; | ||
esac | ||
- name: Notify if merge has conflicts | ||
if: steps.merge.outputs.conflicts == 'true' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MM_TOKEN: ${{ secrets.MM_TOKEN }} | ||
MM_USERS: ${{ secrets.MM_USERS }} | ||
run: | | ||
set -ex | ||
SOURCE_BRANCH=${{ steps.branch.outputs.source }} | ||
TARGET_BRANCH=${{ steps.branch.outputs.target }} | ||
# Get PR info | ||
PR_INFO=$(gh pr list --search="${{ github.sha }}" --state=merged --base="$SOURCE_BRANCH" --json='number,author') | ||
PR_NUMBER=$(echo "$PR_INFO" | jq '.[].number') | ||
PR_AUTHOR=$(echo "$PR_INFO" | jq -r '.[].author.login') | ||
MM_USER=$(echo "$MM_USERS" | jq -r ".\"$PR_AUTHOR\"") | ||
if [[ $MM_USER == '' || $MM_USER == null ]]; then | ||
MM_USER=$PR_AUTHOR | ||
fi | ||
MESSAGE="@$MM_USER your PR [#$PR_NUMBER](https://github.com/juju/juju/pull/$PR_NUMBER) has created merge conflicts - please merge $SOURCE_BRANCH into $TARGET_BRANCH and resolve the conflicts. Thanks! :)" | ||
# install mmctl | ||
curl https://github.com/mattermost/mmctl/releases/download/v7.8.5/linux_amd64.tar -Lo mmctl.tar | ||
tar -xvf mmctl.tar | ||
./mmctl auth login 'https://chat.charmhub.io' --name Charmhub --access-token $MM_TOKEN | ||
./mmctl post create Charmhub:juju-watercooler --message "$MESSAGE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.