You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2020/05/20 05:56:40 UTC

[spark] branch master updated: [SPARK-31766][K8S][TESTS] Add Spark version prefix to K8s UUID test image tag

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

gurwls223 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 b7947e0  [SPARK-31766][K8S][TESTS] Add Spark version prefix to K8s UUID test image tag
b7947e0 is described below

commit b7947e0285f61ac2d8cc3f93c75771a64ad8e1cd
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Wed May 20 14:55:23 2020 +0900

    [SPARK-31766][K8S][TESTS] Add Spark version prefix to K8s UUID test image tag
    
    ### What changes were proposed in this pull request?
    
    This PR aims to add Spark version prefix during generating test image tag for K8s integration testing.
    
    ### Why are the changes needed?
    
    This helps to distinguish the images by version.
    
    **BEFORE**
    ```
    $ docker images | grep kubespark
    kubespark/spark-py  F7188CBD-AE08-4705-9C8A-D0DD3DC8B86F  ...
    kubespark/spark     F7188CBD-AE08-4705-9C8A-D0DD3DC8B86F  ...
    ```
    
    **AFTER**
    ```
    $ docker images | grep kubespark
    kubespark/spark-py  3.1.0-SNAPSHOT_F7188CBD-AE08-4705-9C8A-D0DD3DC8B86F ...
    kubespark/spark     3.1.0-SNAPSHOT_F7188CBD-AE08-4705-9C8A-D0DD3DC8B86F ...
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Pass the K8s integration test.
    
    ```
    ...
    Successfully tagged kubespark/spark:3.1.0-SNAPSHOT_688b46c8-c119-404d-aadb-d05a14262db7
    ...
    Successfully tagged kubespark/spark-py:3.1.0-SNAPSHOT_688b46c8-c119-404d-aadb-d05a14262db7
    ...
    Successfully tagged kubespark/spark-r:3.1.0-SNAPSHOT_688b46c8-c119-404d-aadb-d05a14262db7
    ```
    
    Closes #28587 from dongjoon-hyun/SPARK-31766.
    
    Authored-by: Dongjoon Hyun <do...@apache.org>
    Signed-off-by: HyukjinKwon <gu...@apache.org>
---
 .../integration-tests/scripts/setup-integration-test-env.sh        | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/resource-managers/kubernetes/integration-tests/scripts/setup-integration-test-env.sh b/resource-managers/kubernetes/integration-tests/scripts/setup-integration-test-env.sh
index ab90660..2e72ff8 100755
--- a/resource-managers/kubernetes/integration-tests/scripts/setup-integration-test-env.sh
+++ b/resource-managers/kubernetes/integration-tests/scripts/setup-integration-test-env.sh
@@ -25,6 +25,7 @@ IMAGE_REPO="docker.io/kubespark"
 IMAGE_TAG="N/A"
 JAVA_IMAGE_TAG="8-jre-slim"
 SPARK_TGZ="N/A"
+MVN="$TEST_ROOT_DIR/build/mvn"
 
 # Parse arguments
 while (( "$#" )); do
@@ -84,7 +85,11 @@ fi
 # If there is a specific Spark image skip building and extraction/copy
 if [[ $IMAGE_TAG == "N/A" ]];
 then
-  IMAGE_TAG=$(uuidgen);
+  VERSION=$("$MVN" help:evaluate -Dexpression=project.version \
+    | grep -v "INFO"\
+    | grep -v "WARNING"\
+    | tail -n 1)
+  IMAGE_TAG=${VERSION}_$(uuidgen)
   cd $SPARK_INPUT_DIR
 
   # OpenJDK base-image tag (e.g. 8-jre-slim, 11-jre-slim)


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