You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2022/01/30 18:12:53 UTC

[spark] branch master updated: [SPARK-38072][K8S][TESTS] Support K8s imageTag parameter in SBT K8s IT

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

dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 419d173  [SPARK-38072][K8S][TESTS] Support K8s imageTag parameter in SBT K8s IT
419d173 is described below

commit 419d17378c7fe4d9715eca3f84bcc86354c71941
Author: William Hyun <wi...@apache.org>
AuthorDate: Sun Jan 30 10:11:03 2022 -0800

    [SPARK-38072][K8S][TESTS] Support K8s imageTag parameter in SBT K8s IT
    
    ### What changes were proposed in this pull request?
    This PR aims to support K8s `imageTag` parameter in SBT K8s integration test.
    
    ### Why are the changes needed?
    To make maven and SBT consistent.
    
    ### Does this PR introduce _any_ user-facing change?
    No.
    
    ### How was this patch tested?
    Manually.
    
    Closes #35365 from williamhyun/imagetag.
    
    Authored-by: William Hyun <wi...@apache.org>
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
 project/SparkBuild.scala | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala
index 53ea7ec..9d4034d 100644
--- a/project/SparkBuild.scala
+++ b/project/SparkBuild.scala
@@ -623,7 +623,7 @@ object KubernetesIntegrationTests {
 
   val dockerBuild = TaskKey[Unit]("docker-imgs", "Build the docker images for ITs.")
   val runITs = TaskKey[Unit]("run-its", "Only run ITs, skip image build.")
-  val imageTag = settingKey[String]("Tag to use for images built during the test.")
+  val imageTag = sys.props.get("spark.kubernetes.test.imageTag")
   val namespace = sys.props.get("spark.kubernetes.test.namespace")
   val deployMode = sys.props.get("spark.kubernetes.test.deployMode")
 
@@ -633,7 +633,6 @@ object KubernetesIntegrationTests {
   private var shouldBuildImage = true
 
   lazy val settings = Seq(
-    imageTag := "dev",
     dockerBuild := {
       if (shouldBuildImage) {
         val dockerTool = s"$sparkHome/bin/docker-image-tool.sh"
@@ -647,7 +646,7 @@ object KubernetesIntegrationTests {
           Seq("-f", s"$dockerFile")
         }
         val cmd = Seq(dockerTool,
-          "-t", imageTag.value,
+          "-t", imageTag.getOrElse("dev"),
           "-p", s"$bindingsDir/python/Dockerfile",
           "-R", s"$bindingsDir/R/Dockerfile") ++
           (if (deployMode == Some("docker-for-desktop")) Seq.empty else Seq("-m")) ++
@@ -669,7 +668,7 @@ object KubernetesIntegrationTests {
     (Test / test) := (Test / test).dependsOn(dockerBuild).value,
     (Test / javaOptions) ++= Seq(
       s"-Dspark.kubernetes.test.deployMode=${deployMode.getOrElse("minikube")}",
-      s"-Dspark.kubernetes.test.imageTag=${imageTag.value}",
+      s"-Dspark.kubernetes.test.imageTag=${imageTag.getOrElse("dev")}",
       s"-Dspark.kubernetes.test.unpackSparkDir=$sparkHome"
     ),
     (Test / javaOptions) ++= namespace.map("-Dspark.kubernetes.test.namespace=" + _),

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org