diff --git a/.github/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml b/.github/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml index 82d284a829ad..89f7f319eaab 100644 --- a/.github/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml +++ b/.github/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml @@ -79,6 +79,9 @@ jobs: - name: GCloud Docker credential helper run: | gcloud auth configure-docker us.gcr.io + - name: Generate TAG unique variable based on timestamp + id: set_tag + run: echo "TAG=$(date +'%Y%m%d-%H%M%S%N')" >> $GITHUB_OUTPUT - name: run XVR GoUsingJava Dataflow script env: USER: github-actions @@ -86,6 +89,10 @@ jobs: uses: ./.github/actions/gradle-command-self-hosted-action with: gradle-command: :runners:google-cloud-dataflow-java:validatesCrossLanguageRunnerGoUsingJava + arguments: | + -Pdocker-repository-root=us.gcr.io/apache-beam-testing/github-actions \ + -Pdocker-tag=${{ steps.set_tag.outputs.TAG }} \ + -Ppush-containers \ - name: Archive JUnit Test Results uses: actions/upload-artifact@v4 if: ${{ !success() }} diff --git a/runners/google-cloud-dataflow-java/build.gradle b/runners/google-cloud-dataflow-java/build.gradle index 76f4aac6808b..43f2096ab2bc 100644 --- a/runners/google-cloud-dataflow-java/build.gradle +++ b/runners/google-cloud-dataflow-java/build.gradle @@ -284,9 +284,12 @@ def buildAndPushDockerJavaContainer = tasks.register("buildAndPushDockerJavaCont } dependsOn ":sdks:java:container:${javaVer}:docker" def defaultDockerImageName = containerImageName( - name: "${project.docker_image_default_repo_prefix}${javaVer}_sdk", - root: "apache", - tag: project.sdk_version) + name: "${project.docker_image_default_repo_prefix}java${javaVer}_sdk", + root: project.rootProject.hasProperty(["docker-repository-root"]) ? + project.rootProject["docker-repository-root"] : + project.docker_image_default_repo_root, + tag: project.rootProject.hasProperty(["docker-tag"]) ? + project.rootProject["docker-tag"] : project.sdk_version) doLast { exec { commandLine "docker", "tag", "${defaultDockerImageName}", "${dockerJavaImageName}" @@ -328,8 +331,11 @@ def buildAndPushDockerPythonContainer = tasks.create("buildAndPushDockerPythonCo dependsOn ":sdks:python:container:py"+pythonVer.replace('.', '')+":docker" def defaultDockerImageName = containerImageName( name: "${project.docker_image_default_repo_prefix}python${pythonVer}_sdk", - root: "apache", - tag: project.sdk_version) + root: project.rootProject.hasProperty(["docker-repository-root"]) ? + project.rootProject["docker-repository-root"] : + project.docker_image_default_repo_root, + tag: project.rootProject.hasProperty(["docker-tag"]) ? + project.rootProject["docker-tag"] : project.sdk_version) doLast { exec { commandLine "docker", "tag", "${defaultDockerImageName}", "${dockerPythonImageName}"