nodece opened a new pull request, #25194:
URL: https://github.com/apache/pulsar/pull/25194
### Motivation
When pushing images to Docker Hub, the `docker-maven-plugin` currently
builds the image twice: once during the `build` goal and again during the
`push` goal. This results in redundant work and unnecessary build time.
This change makes the Docker goal configurable so that the image is built
only once when pushing.
### Modifications
* Replaced the hardcoded Docker goals (`build` and `push`) in the default
execution of the Docker Maven plugin with the `${docker.goal}` property in both
`docker/pulsar/pom.xml` and `docker/pulsar-all/pom.xml`, allowing the active
goal to be configured.
* Set the default value of the `docker.goal` property to `build` in the root
`pom.xml`, preserving the existing behavior for normal builds.
* Added the `docker.goal=push` property to the `docker-push` Maven profile
in both `docker/pulsar/pom.xml` and `docker/pulsar-all/pom.xml`, so activating
this profile pushes the image without triggering an extra build.
### Documentation
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [ ] `doc` <!-- Your PR contains doc changes. -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update
later -->
- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]