Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize the release workflows #1361

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

jponge
Copy link
Member

@jponge jponge commented Sep 4, 2023

No description provided.

@jponge jponge added this to the 2.5.0 milestone Sep 4, 2023
@jponge jponge added the ci/cd/build CI/CD pipeline and build label Sep 4, 2023
@jponge jponge self-assigned this Sep 4, 2023
@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Merging #1361 (bbe0e74) into main (5e76525) will decrease coverage by 0.18%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

❗ Current head bbe0e74 differs from pull request most recent head 067a095. Consider uploading reports for the commit 067a095 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1361      +/-   ##
============================================
- Coverage     89.18%   89.00%   -0.18%     
+ Complexity     3357     3349       -8     
============================================
  Files           459      459              
  Lines         13438    13438              
  Branches       1655     1655              
============================================
- Hits          11985    11961      -24     
- Misses          805      819      +14     
- Partials        648      658      +10     

see 11 files with indirect coverage changes

@jponge jponge force-pushed the ci/ripolinage-jreleaser-le-retour branch from 7fbdfa5 to b981996 Compare September 11, 2023 17:14
@jponge jponge force-pushed the ci/ripolinage-jreleaser-le-retour branch from 7511a87 to 54cb78e Compare September 19, 2023 09:54
@jponge jponge marked this pull request as ready for review September 19, 2023 13:51
Uses JReleaser to generate changelogs, and performs some
simplifications over the existing multi-steps workflow.

Also introduces a "justfile" to capture some existing bash
scripts in a central location.
@jponge jponge force-pushed the ci/ripolinage-jreleaser-le-retour branch from f3856bc to 067a095 Compare September 19, 2023 13:56
@jponge
Copy link
Member Author

jponge commented Sep 19, 2023

Ready for review and I've squashed all commits.

@jponge
Copy link
Member Author

jponge commented Sep 19, 2023

As a first step, we'd test on a milestone release, and JReleaser would only tag + generate release notes.

In future iterations we could also automate things like announcements.

@jponge
Copy link
Member Author

jponge commented Sep 19, 2023

For the record, here's what would be run (just --dry-run -f .build/justfile-for-release -d . perform-release):

echo "Decrypting smallrye signature"
gpg --quiet --batch --yes --decrypt --passphrase="${SECRET_FILES_PASSPHRASE}" --output smallrye-sign.asc .build/smallrye-sign.asc.gpg
echo "Decrypting Maven settings"
gpg --quiet --batch --yes --decrypt --passphrase="${SECRET_FILES_PASSPHRASE}" --output maven-settings.xml .build/maven-settings.xml.gpg
echo "GnuPG setup"
gpg --fast-import --no-tty --batch --yes smallrye-sign.asc
echo "Git setup"
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "smallrye@googlegroups.com"
echo "🚀 Pre-release steps..."
echo "Pre-release verifications"
jbang .build/PreRelease.java --token=${RELEASE_TOKEN} --release-version=${RELEASE_VERSION}
echo "Bump project version to ${RELEASE_VERSION}"
./mvnw --settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress versions:set -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false
./mvnw --settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress versions:set -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false -pl bom
jbang .build/UpdateDocsAttributesFiles.java --mutiny-version=${VERSION}
.build/update-workshop-target-version.sh "${VERSION}"
echo "Check that the project builds (no tests)"
./mvnw --settings maven-settings.xml --batch-mode --no-transfer-progress clean install -Prelease -DskipTests
echo "Check that the website builds"
[[ ${DEPLOY_WEBSITE} == "true" ]] && cd documentation && pipenv run mkdocs build
echo "🚀 Release steps..."
echo "Commit release version and push upstream"
git commit -am "chore(release): release Mutiny ${RELEASE_VERSION}"
git push
echo "Call JReleaser"
./mvnw -settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress -Pjreleaser jreleaser:full-release -pl :mutiny-project
echo "Deploy to Maven Central"
./mvnw --settings maven-settings.xml --batch-mode --no-transfer-progress deploy -Prelease -DskipTests
echo "Bump to 999-SNAPSHOT and push upstream"
./mvnw --settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress versions:set -DnewVersion=999-SNAPSHOT -DgenerateBackupPoms=false
./mvnw --settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress versions:set -DnewVersion=999-SNAPSHOT -DgenerateBackupPoms=false -pl bom
git commit -am "chore(release): set development version to 999-SNAPSHOT"
git push
echo "🚀 Post-release steps..."
[[ ${CLEAR_REVAPI} == "true" ]] && just -f .build/justfile-for-release -d . clear-revapi
[[ ${DEPLOY_WEBSITE} == "true" ]] && .build/deploy-site.sh
echo "🎉 Successfully released Mutiny ${RELEASE_VERSION} 🚀"

./mvnw --settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress versions:set -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false
./mvnw --settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress versions:set -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false -pl bom
jbang .build/UpdateDocsAttributesFiles.java --mutiny-version=${VERSION}
.build/update-workshop-target-version.sh "${VERSION}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be in the justfile (was done in a separate PR)

@jponge jponge merged commit ede16dc into smallrye:main Sep 19, 2023
5 checks passed
@jponge jponge deleted the ci/ripolinage-jreleaser-le-retour branch September 19, 2023 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/cd/build CI/CD pipeline and build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants