Build Docker images on push to main with semver pre-release versioning#172
Merged
Conversation
…s on push to main Co-authored-by: jwijgerd <914840+jwijgerd@users.noreply.github.com>
jwijgerd
marked this pull request as ready for review
November 16, 2025 15:07
Copilot
AI
changed the title
[WIP] Build docker images on push to main branch
Build Docker images on push to main with semver pre-release versioning
Nov 16, 2025
jwijgerd
requested changes
Nov 16, 2025
| --activate-profiles docker-snapshot | ||
| --file pom.xml | ||
| --settings $GITHUB_WORKSPACE/settings.xml | ||
| -Ddocker.image.version=${{ steps.version.outputs.prerelease_version }} |
Contributor
There was a problem hiding this comment.
should this not be after the normal arguments?
Contributor
Author
There was a problem hiding this comment.
Fixed in baa2273. Moved -Ddocker.image.version to after the Maven goals to follow the standard Maven command structure: mvn [options] [goals] [properties].
Co-authored-by: jwijgerd <914840+jwijgerd@users.noreply.github.com>
jwijgerd
self-requested a review
November 16, 2025 15:15
jwijgerd
approved these changes
Nov 16, 2025
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.
Build Docker Images on Push to Main ✅
Summary:
This PR implements automatic Docker image building for the CI workflow when changes are pushed to the main branch. Images are tagged with semver-compliant pre-release versions using timestamps for chronological ordering.
Implementation Complete ✅
All Requirements Met:
docker-snapshotprofile (not release profile)Changes Made:
1. Parent pom.xml
docker-snapshotprofile withdocker.image.versionproperty2. services/pom.xml
docker-snapshotprofile implementation${docker.image.version}for image tagging3. test-apps/pom.xml
docker-snapshotprofile implementation${docker.image.version}for image tagging4. .github/workflows/maven.yml
docker-snapshotjobbuildjob{base_version}-dev.{timestamp}0.11.0-dev.20251116150614Version Format:
Semver Compliant Pre-Release
{major}.{minor}.{patch}-dev.{YYYYMMDDHHMMSS}0.11.0-dev.20251116150614Docker Images:
The following images are built and published to ghcr.io:
ghcr.io/elasticsoftwarefoundation/akces-operator:{version}ghcr.io/elasticsoftwarefoundation/crypto-trading-aggregates:{version}ghcr.io/elasticsoftwarefoundation/crypto-trading-commands:{version}ghcr.io/elasticsoftwarefoundation/crypto-trading-queries:{version}Workflow Behavior:
Benefits:
✅ Automatic Builds - Docker images on every main push
✅ Chronological Ordering - Timestamp ensures proper version ordering
✅ Semver Compliant - Follows industry standard versioning
✅ Separate Process - No coupling with Maven Central releases
✅ Development Ready - Pre-release images for testing
✅ Minimal Changes - Only 4 files modified
Validation:
✓ YAML syntax validated
✓ Maven profiles recognized by all modules
✓ Version calculation tested and working
✓ Semver format compliance verified
✓ Chronological ordering confirmed
✓ Maven command argument order corrected
Total Changes:
Ready for review and merge 🚀
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.