feat: automated project version management and docker release#6
Draft
davidgamez wants to merge 2 commits into
Draft
feat: automated project version management and docker release#6davidgamez wants to merge 2 commits into
davidgamez wants to merge 2 commits into
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Derive version from git tags + snapshot/release Docker publishing
Automates the API version so it always matches the release tag, and publishes
Docker images for both
mainsnapshots and tagged releases. No more hand-editingpom.xmlper release.Changes
maven-git-versioning-extension(.mvn/). A tagvX.Y.Zbuilds versionX.Y.Z; any other build is0.0.0-SNAPSHOT.pom.xmlkeeps a placeholder version and is never edited for releases.
docker.yml) — both variants (stable-core and validator-core-snapshot) build on every event; pushes happen on non-PR events only.
latestis applied on releases, stable variant only.
org.opencontainers.image.sourceis set from thebuilding repo (lower-cased
github.repository) so forks link to their ownpackage; sensible default for local builds.
Versions and CI tables.
Docker versioning
Image tags follow
<apiVersion>-validator<validatorCoreVersion>. The API versioncomes from git (release tag or
0.0.0-SNAPSHOT), and the validator core versioncomes from the build variant. The two are independent: a
mainbuild is an APIsnapshot, which is not the same as the validator-core snapshot.
On merge to
main(no release tag), the API version resolves to0.0.0-SNAPSHOT, so both variants publish as API snapshots:main0.0.0-SNAPSHOT-validator8.0.10.0.0-SNAPSHOT-validator8.0.2-SNAPSHOTlatestis not moved bymainmerges — these are dev/preview images.On release (
vX.Y.Ztag / GitHub Release), the API version resolves toX.Y.Z:X.Y.Z-validator8.0.1+latestX.Y.Z-validator8.0.2-SNAPSHOTOn pull requests, both variants build (to validate the Dockerfile) but nothing
is published.
Verified
0.0.0-SNAPSHOT; tagv1.2.3→1.2.3.docker.ymlis valid YAML.