Improve CI checks for enterprise merges on master (#4981)

pull/4972/head
Hanefi Onaldi 2021-05-12 19:15:15 +03:00 committed by GitHub
parent c91f8d8a15
commit b649dffabd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -156,9 +156,9 @@ git merge "community/$PR_BRANCH"
familiar with the change. familiar with the change.
5. You should rerun the `check-merge-to-enterprise` check on 5. You should rerun the `check-merge-to-enterprise` check on
`community/$PR_BRANCH`. You can use re-run from failed option in circle CI. `community/$PR_BRANCH`. You can use re-run from failed option in circle CI.
6. You can now merge the PR on community. Be sure to NOT use "squash and merge", 6. You can now merge the PR on enterprise. Be sure to NOT use "squash and merge",
but instead use the regular "merge commit" mode. but instead use the regular "merge commit" mode.
7. You can now merge the PR on enterprise. Be sure to NOT use "squash and merge", 7. You can now merge the PR on community. Be sure to NOT use "squash and merge",
but instead use the regular "merge commit" mode. but instead use the regular "merge commit" mode.
The subsequent PRs on community will be able to pass the The subsequent PRs on community will be able to pass the

View File

@ -65,6 +65,14 @@ fi
# undo partial merge # undo partial merge
git merge --abort git merge --abort
# If we have a conflict on enterprise merge on the master branch, we have a problem.
# Provide an error message to indicate that enterprise merge is needed.
if [[ $PR_BRANCH = master ]]; then
echo "ERROR: Master branch has merge conlicts with enterprise-master."
echo "Try re-running this job if you merged community PR before enterprise PR. Otherwise conflicts need to be resolved as a separate PR on enterprise."
exit 1
fi
if ! git fetch enterprise "$PR_BRANCH" ; then if ! git fetch enterprise "$PR_BRANCH" ; then
echo "ERROR: enterprise/$PR_BRANCH was not found and community PR branch could not be merged into enterprise-master" echo "ERROR: enterprise/$PR_BRANCH was not found and community PR branch could not be merged into enterprise-master"
exit 1 exit 1