This is an automated email from the ASF dual-hosted git repository.
zixuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new ea195bcae39 [improve][build] Enhance Docker build task to support
image pushing (#25459)
ea195bcae39 is described below
commit ea195bcae39e1509407dbf8c9d6013678037c10a
Author: Zixuan Liu <[email protected]>
AuthorDate: Fri Apr 3 20:26:23 2026 +0800
[improve][build] Enhance Docker build task to support image pushing (#25459)
---
docker/pulsar/build.gradle.kts | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/docker/pulsar/build.gradle.kts b/docker/pulsar/build.gradle.kts
index a43eea374a7..fab9da0f272 100644
--- a/docker/pulsar/build.gradle.kts
+++ b/docker/pulsar/build.gradle.kts
@@ -26,6 +26,7 @@ val dockerOrganization =
providers.gradleProperty("docker.organization").getOrEl
val dockerImage = providers.gradleProperty("docker.image").getOrElse("pulsar")
val dockerTag = providers.gradleProperty("docker.tag").getOrElse("latest")
val dockerPlatforms =
providers.gradleProperty("docker.platforms").getOrElse("")
+val dockerPush = providers.gradleProperty("docker.push").isPresent
val useWolfi = providers.gradleProperty("docker.wolfi").isPresent
// Resolvable configurations for cross-project artifact dependencies.
@@ -59,7 +60,7 @@ val copyOffloaderTarball by tasks.registering(Copy::class) {
val dockerBuild by tasks.registering(Exec::class) {
group = "docker"
- description = "Build the Pulsar Docker image"
+ description = "Build the Pulsar Docker image. Use -Pdocker.push to push
the image to registry."
dependsOn(copyTarball, copyOffloaderTarball)
@@ -90,6 +91,10 @@ val dockerBuild by tasks.registering(Exec::class) {
args.addAll(listOf("--platform", dockerPlatforms))
}
+ if (dockerPush) {
+ args.add("--push")
+ }
+
args.add(".")
commandLine(args)