File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ val dockerOrganization = providers.gradleProperty("docker.organization").getOrEl
2626val dockerImage = providers.gradleProperty(" docker.image" ).getOrElse(" pulsar" )
2727val dockerTag = providers.gradleProperty(" docker.tag" ).getOrElse(" latest" )
2828val dockerPlatforms = providers.gradleProperty(" docker.platforms" ).getOrElse(" " )
29+ val dockerPush = providers.gradleProperty(" docker.push" ).isPresent
2930val useWolfi = providers.gradleProperty(" docker.wolfi" ).isPresent
3031
3132// Resolvable configurations for cross-project artifact dependencies.
@@ -59,7 +60,7 @@ val copyOffloaderTarball by tasks.registering(Copy::class) {
5960
6061val dockerBuild by tasks.registering(Exec ::class ) {
6162 group = " docker"
62- description = " Build the Pulsar Docker image"
63+ description = " Build the Pulsar Docker image. Use -Pdocker.push to push the image to registry. "
6364
6465 dependsOn(copyTarball, copyOffloaderTarball)
6566
@@ -90,6 +91,10 @@ val dockerBuild by tasks.registering(Exec::class) {
9091 args.addAll(listOf (" --platform" , dockerPlatforms))
9192 }
9293
94+ if (dockerPush) {
95+ args.add(" --push" )
96+ }
97+
9398 args.add(" ." )
9499
95100 commandLine(args)
You can’t perform that action at this time.
0 commit comments