Skip to content

Commit

Permalink
have the release workflow run the smoketest. If it fails, title the PR (
Browse files Browse the repository at this point in the history
#232)

with a loud warning and indicate it should not be merged. Otherwise,
create the PR as it normally does.

fixes kiali/kiali#6704
  • Loading branch information
jmazzitelli authored Nov 16, 2023
1 parent 0751319 commit 25346bc
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,32 @@ jobs:
git push origin $(git rev-parse HEAD):refs/heads/$BUILD_TAG
gh pr create -t "Prepare for next version" -b "Please, merge to update version numbers and prepare for release $NEXT_VERSION." -H $BUILD_TAG -B $RELEASE_BRANCH
if hack/smoke-test-release-branch.sh --release-branch $BUILD_TAG; then
prtitle="Prepare for next version"
prmsg="Please merge to update version numbers and prepare for release $NEXT_VERSION"
else
prtitle="[DO NOT MERGE YET] Prepare for next version"
prmsg="DO NOT MERGE YET! The smoke test failed. Please fix the problem before merging this PR which updates version numbers and prepares for release $NEXT_VERSION"
fi
gh pr create -t "$prtitle" -b "$prmsg" -H $BUILD_TAG -B $RELEASE_BRANCH
# For a patch release, everything is ready to publish the generated charts.
# Let's push to master
elif [[ $RELEASE_TYPE == "patch" ]]
then
git push origin $(git rev-parse HEAD):refs/heads/$BUILD_TAG
gh pr create -t "Prepare for next version" -b "Please, merge to update version numbers and prepare for release $NEXT_VERSION." -H $BUILD_TAG -B master
if hack/smoke-test-release-branch.sh --release-branch $BUILD_TAG; then
prtitle="Prepare for next version"
prmsg="Please merge to update version numbers and prepare for release $NEXT_VERSION"
else
prtitle="[DO NOT MERGE YET] Prepare for next version"
prmsg="DO NOT MERGE YET! The smoke test failed. Please fix the problem before merging this PR which updates version numbers and prepares for release $NEXT_VERSION"
fi
gh pr create -t "$prtitle" -b "$prmsg" -H $BUILD_TAG -B master
# We did a patch release. In this case we need to go back to the version branch and do changes
# to the Makefile in that branch to record what's the current path release. Then, commit and push.
# Also, a vX.Y.Z branch is created
Expand All @@ -246,4 +262,4 @@ jobs:
git push origin $(git rev-parse HEAD):refs/tags/$RELEASE_VERSION
fi
fi

0 comments on commit 25346bc

Please sign in to comment.