This is an automated email from the ASF dual-hosted git repository.

dongjoon-hyun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new ac4de365 [SPARK-60065] Build the operator image without Gradle in the 
build-image CI job
ac4de365 is described below

commit ac4de36598c58ea29f0556f5005b21696a79e29f
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Wed Oct 7 20:15:14 2026 -0700

    [SPARK-60065] Build the operator image without Gradle in the build-image CI 
job
    
    ### What changes were proposed in this pull request?
    
    This PR aims to run `docker build` directly in the `build-image` job 
instead of `./gradlew buildDockerImage`, and to remove the unused `Set up JDK 
26` and `Setup Gradle` steps. The image version is extracted from 
`build.gradle`, so the image name, tag and build argument stay the same.
    
    ### Why are the changes needed?
    
    The `build-image` job is on the critical path of all E2E jobs. Gradle on 
the host spends about 42s computing the task graph before it runs `docker 
build`, and the JDK and Gradle setup take about 10s more.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No. This is a CI-only change.
    
    ### How was this patch tested?
    
    Pass the CIs. I also ran the new step locally and checked that the image 
has the `org.opencontainers.image.version` label `1.1.0-SNAPSHOT`.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Opus 5.5
    
    Closes #955 from dongjoon-hyun/SPARK-60065.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 .github/workflows/build_and_test.yml | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/build_and_test.yml 
b/.github/workflows/build_and_test.yml
index 28d40d2b..a65a3edf 100644
--- a/.github/workflows/build_and_test.yml
+++ b/.github/workflows/build_and_test.yml
@@ -59,18 +59,12 @@ jobs:
     steps:
       - name: Checkout repository
         uses: actions/checkout@v7
-      - name: Set up JDK 26
-        uses: actions/setup-java@v6
-        with:
-          java-version: 26
-          distribution: 'zulu'
-      - name: Setup Gradle
-        uses: 
gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb
-        with:
-          cache-provider: basic
       - name: Build Operator Image
         run: |
-          ./gradlew buildDockerImage
+          # Same as `./gradlew buildDockerImage` without starting Gradle on 
the host
+          VERSION=$(sed -n 's/^  version = "\(.*\)"$/\1/p' build.gradle)
+          test -n "$VERSION"
+          docker build --build-arg APP_VERSION="$VERSION" -t 
"apache/spark-kubernetes-operator:$VERSION" -f build-tools/docker/Dockerfile .
       - name: Save Operator Image
         run: |
           docker save apache/spark-kubernetes-operator | zstd -T0 -o 
spark-kubernetes-operator.tar.zst


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to