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

davidzollo pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new 0a5ceee201 [Improve][E2E] Add multi-arch Spark test images (#11664)
0a5ceee201 is described below

commit 0a5ceee2018e44659593fc16ad57f154a4483210
Author: FenjuFu <[email protected]>
AuthorDate: Tue Aug 11 23:30:46 2026 +0800

    [Improve][E2E] Add multi-arch Spark test images (#11664)
    
    Signed-off-by: FenjuFu <[email protected]>
---
 .github/workflows/publish-e2e-spark-images.yaml    | 46 ++++++++++++++++++++++
 .../src/test/docker/spark/Dockerfile               | 45 +++++++++++++++++++++
 .../src/test/docker/spark/docker-bake.hcl          | 43 ++++++++++++++++++++
 .../src/test/docker/spark/entrypoint.sh            | 31 +++++++++++++++
 4 files changed, 165 insertions(+)

diff --git a/.github/workflows/publish-e2e-spark-images.yaml 
b/.github/workflows/publish-e2e-spark-images.yaml
new file mode 100644
index 0000000000..1dc452b4d1
--- /dev/null
+++ b/.github/workflows/publish-e2e-spark-images.yaml
@@ -0,0 +1,46 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: publish-e2e-spark-images
+
+on:
+  workflow_dispatch:
+
+concurrency:
+  group: publish-e2e-spark-images
+  cancel-in-progress: false
+
+jobs:
+  build:
+    if: github.repository == 'apache/seatunnel'
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+    timeout-minutes: 60
+    steps:
+      - uses: actions/checkout@v4
+      - name: Log in to Docker Hub
+        uses: docker/login-action@v3
+        with:
+          username: ${{ secrets.DOCKERHUB_USER }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v3
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v3
+      - name: Build and push Spark E2E images
+        working-directory: 
seatunnel-e2e/seatunnel-e2e-common/src/test/docker/spark
+        run: docker buildx bake --push
diff --git 
a/seatunnel-e2e/seatunnel-e2e-common/src/test/docker/spark/Dockerfile 
b/seatunnel-e2e/seatunnel-e2e-common/src/test/docker/spark/Dockerfile
new file mode 100644
index 0000000000..b673896220
--- /dev/null
+++ b/seatunnel-e2e/seatunnel-e2e-common/src/test/docker/spark/Dockerfile
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+FROM eclipse-temurin:8-jre-jammy
+
+ARG SPARK_VERSION
+ARG HADOOP_PROFILE
+
+RUN test -n "${SPARK_VERSION}" \
+    && test -n "${HADOOP_PROFILE}" \
+    && apt-get update \
+    && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends 
-y \
+        bash \
+        ca-certificates \
+        curl \
+        procps \
+        tini \
+    && curl --fail --location --retry 3 \
+        
"https://archive.apache.org/dist/spark/spark-${SPARK_VERSION}/spark-${SPARK_VERSION}-bin-${HADOOP_PROFILE}.tgz";
 \
+        --output /tmp/spark.tgz \
+    && tar --extract --gzip --file /tmp/spark.tgz --directory /opt \
+    && mv "/opt/spark-${SPARK_VERSION}-bin-${HADOOP_PROFILE}" /opt/spark \
+    && rm /tmp/spark.tgz \
+    && rm -rf /var/lib/apt/lists/*
+
+ENV SPARK_HOME=/opt/spark \
+    SPARK_MODE=master \
+    PATH=/opt/spark/bin:/opt/spark/sbin:${PATH}
+
+COPY --chmod=755 entrypoint.sh /opt/seatunnel-e2e/entrypoint.sh
+
+ENTRYPOINT ["/usr/bin/tini", "--", "/opt/seatunnel-e2e/entrypoint.sh"]
diff --git 
a/seatunnel-e2e/seatunnel-e2e-common/src/test/docker/spark/docker-bake.hcl 
b/seatunnel-e2e/seatunnel-e2e-common/src/test/docker/spark/docker-bake.hcl
new file mode 100644
index 0000000000..e2ba1f27f3
--- /dev/null
+++ b/seatunnel-e2e/seatunnel-e2e-common/src/test/docker/spark/docker-bake.hcl
@@ -0,0 +1,43 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+group "default" {
+  targets = ["spark-2.4.6", "spark-3.3.0"]
+}
+
+target "spark" {
+  context    = "."
+  dockerfile = "Dockerfile"
+  platforms  = ["linux/amd64", "linux/arm64"]
+}
+
+target "spark-2.4.6" {
+  inherits = ["spark"]
+  args = {
+    SPARK_VERSION  = "2.4.6"
+    HADOOP_PROFILE = "hadoop2.7"
+  }
+  tags = ["apache/seatunnel:e2e-spark-2.4.6"]
+}
+
+target "spark-3.3.0" {
+  inherits = ["spark"]
+  args = {
+    SPARK_VERSION  = "3.3.0"
+    HADOOP_PROFILE = "hadoop3"
+  }
+  tags = ["apache/seatunnel:e2e-spark-3.3.0"]
+}
diff --git 
a/seatunnel-e2e/seatunnel-e2e-common/src/test/docker/spark/entrypoint.sh 
b/seatunnel-e2e/seatunnel-e2e-common/src/test/docker/spark/entrypoint.sh
new file mode 100644
index 0000000000..3026e7ca32
--- /dev/null
+++ b/seatunnel-e2e/seatunnel-e2e-common/src/test/docker/spark/entrypoint.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -euo pipefail
+
+# SeaTunnel's current Spark E2E container starts only a Spark master process.
+case "${SPARK_MODE:-master}" in
+    master)
+        exec "${SPARK_HOME}/bin/spark-class" 
org.apache.spark.deploy.master.Master \
+            --host "${SPARK_MASTER_HOST:-spark-master}"
+        ;;
+    *)
+        echo "Unsupported SPARK_MODE: ${SPARK_MODE}" >&2
+        exit 1
+        ;;
+esac

Reply via email to