From 3aa902a8534059b514b207645dc8cb7765fbf2a1 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Mon, 22 Jan 2024 10:05:08 -0500 Subject: [PATCH 1/7] Fix https://github.com/apache/beam/actions/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml --- .../google-cloud-dataflow-java/build.gradle | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/runners/google-cloud-dataflow-java/build.gradle b/runners/google-cloud-dataflow-java/build.gradle index 76f4aac6808b..fb8df9ed0922 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${imageJavaVersion}_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}" @@ -327,9 +330,12 @@ def buildAndPushDockerPythonContainer = tasks.create("buildAndPushDockerPythonCo def pythonVer = project.project(':sdks:python').pythonVersion 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) + name: project.docker_image_default_repo_prefix + "python${project.ext.pythonVersion}_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}", "${dockerPythonImageName}" From cf8922802e7be433a614063968c14d9b2048fc15 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Mon, 22 Jan 2024 10:39:23 -0500 Subject: [PATCH 2/7] Fix version vars --- runners/google-cloud-dataflow-java/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runners/google-cloud-dataflow-java/build.gradle b/runners/google-cloud-dataflow-java/build.gradle index fb8df9ed0922..43f2096ab2bc 100644 --- a/runners/google-cloud-dataflow-java/build.gradle +++ b/runners/google-cloud-dataflow-java/build.gradle @@ -284,7 +284,7 @@ def buildAndPushDockerJavaContainer = tasks.register("buildAndPushDockerJavaCont } dependsOn ":sdks:java:container:${javaVer}:docker" def defaultDockerImageName = containerImageName( - name: "${project.docker_image_default_repo_prefix}java${imageJavaVersion}_sdk", + 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, @@ -330,7 +330,7 @@ def buildAndPushDockerPythonContainer = tasks.create("buildAndPushDockerPythonCo def pythonVer = project.project(':sdks:python').pythonVersion dependsOn ":sdks:python:container:py"+pythonVer.replace('.', '')+":docker" def defaultDockerImageName = containerImageName( - name: project.docker_image_default_repo_prefix + "python${project.ext.pythonVersion}_sdk", + name: "${project.docker_image_default_repo_prefix}python${pythonVer}_sdk", root: project.rootProject.hasProperty(["docker-repository-root"]) ? project.rootProject["docker-repository-root"] : project.docker_image_default_repo_root, From 511b3122c5c8d8be12e08e656ec3d83668706178 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Mon, 22 Jan 2024 16:11:48 -0500 Subject: [PATCH 3/7] Remove . --- runners/google-cloud-dataflow-java/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runners/google-cloud-dataflow-java/build.gradle b/runners/google-cloud-dataflow-java/build.gradle index 43f2096ab2bc..b6c55b8d595e 100644 --- a/runners/google-cloud-dataflow-java/build.gradle +++ b/runners/google-cloud-dataflow-java/build.gradle @@ -327,7 +327,7 @@ def buildAndPushDockerPythonContainer = tasks.create("buildAndPushDockerPythonCo return } project.evaluationDependsOn(":sdks:python") - def pythonVer = project.project(':sdks:python').pythonVersion + def pythonVer = project.project(':sdks:python').pythonVersion.replace('.', '') dependsOn ":sdks:python:container:py"+pythonVer.replace('.', '')+":docker" def defaultDockerImageName = containerImageName( name: "${project.docker_image_default_repo_prefix}python${pythonVer}_sdk", From d9003bcb8970c820e398231ccf9d0e26b70b5f8f Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Mon, 22 Jan 2024 16:14:04 -0500 Subject: [PATCH 4/7] Undo bad fix --- runners/google-cloud-dataflow-java/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runners/google-cloud-dataflow-java/build.gradle b/runners/google-cloud-dataflow-java/build.gradle index b6c55b8d595e..43f2096ab2bc 100644 --- a/runners/google-cloud-dataflow-java/build.gradle +++ b/runners/google-cloud-dataflow-java/build.gradle @@ -327,7 +327,7 @@ def buildAndPushDockerPythonContainer = tasks.create("buildAndPushDockerPythonCo return } project.evaluationDependsOn(":sdks:python") - def pythonVer = project.project(':sdks:python').pythonVersion.replace('.', '') + def pythonVer = project.project(':sdks:python').pythonVersion dependsOn ":sdks:python:container:py"+pythonVer.replace('.', '')+":docker" def defaultDockerImageName = containerImageName( name: "${project.docker_image_default_repo_prefix}python${pythonVer}_sdk", From 641af56979f4e1b9009f145dbb2c95d41fad44cd Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Mon, 22 Jan 2024 16:18:26 -0500 Subject: [PATCH 5/7] Push containers for tagging --- .../workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml | 7 +++++++ 1 file changed, 7 insertions(+) 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() }} From b84a213558eafd58e66fb6b509a84113753f7c78 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Mon, 22 Jan 2024 16:20:23 -0500 Subject: [PATCH 6/7] Dont need to push --- .github/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml b/.github/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml index 89f7f319eaab..aa73794de855 100644 --- a/.github/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml +++ b/.github/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml @@ -92,7 +92,6 @@ jobs: 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() }} From 8e4a3d9a18cf4b123a6e10c65a9e666b0b346b19 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Mon, 22 Jan 2024 16:42:15 -0500 Subject: [PATCH 7/7] Try pushing --- .github/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml b/.github/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml index aa73794de855..89f7f319eaab 100644 --- a/.github/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml +++ b/.github/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml @@ -92,6 +92,7 @@ jobs: 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() }}