Skip to content

Commit b7947e0

Browse files
dongjoon-hyunHyukjinKwon
authored andcommitted
[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 <[email protected]> Signed-off-by: HyukjinKwon <[email protected]>
1 parent dc3a606 commit b7947e0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

resource-managers/kubernetes/integration-tests/scripts/setup-integration-test-env.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ IMAGE_REPO="docker.io/kubespark"
2525
IMAGE_TAG="N/A"
2626
JAVA_IMAGE_TAG="8-jre-slim"
2727
SPARK_TGZ="N/A"
28+
MVN="$TEST_ROOT_DIR/build/mvn"
2829

2930
# Parse arguments
3031
while (( "$#" )); do
@@ -84,7 +85,11 @@ fi
8485
# If there is a specific Spark image skip building and extraction/copy
8586
if [[ $IMAGE_TAG == "N/A" ]];
8687
then
87-
IMAGE_TAG=$(uuidgen);
88+
VERSION=$("$MVN" help:evaluate -Dexpression=project.version \
89+
| grep -v "INFO"\
90+
| grep -v "WARNING"\
91+
| tail -n 1)
92+
IMAGE_TAG=${VERSION}_$(uuidgen)
8893
cd $SPARK_INPUT_DIR
8994

9095
# OpenJDK base-image tag (e.g. 8-jre-slim, 11-jre-slim)

0 commit comments

Comments
 (0)