From b5f7cbfadf203f6e28ddd7543726346046df656b Mon Sep 17 00:00:00 2001 From: Philip Hyunsu Cho Date: Sat, 11 May 2019 10:54:00 -0700 Subject: [PATCH] [CI] Cache two R build Docker containers (#4458) --- tests/ci_build/ci_build.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/ci_build/ci_build.sh b/tests/ci_build/ci_build.sh index 37a98dd804d7..f6abe2beae1c 100755 --- a/tests/ci_build/ci_build.sh +++ b/tests/ci_build/ci_build.sh @@ -95,7 +95,14 @@ CUDA_VERSION=$(echo "${CI_DOCKER_BUILD_ARG}" | egrep -o 'CUDA_VERSION=[0-9]+\.[0 JDK_VERSION=$(echo "${CI_DOCKER_BUILD_ARG}" | egrep -o 'JDK_VERSION=[0-9]+' | egrep -o '[0-9]+') # Append cmake version if available CMAKE_VERSION=$(echo "${CI_DOCKER_BUILD_ARG}" | egrep -o 'CMAKE_VERSION=[0-9]+\.[0-9]+' | egrep -o '[0-9]+\.[0-9]+') -DOCKER_IMG_NAME=$DOCKER_IMG_NAME$CUDA_VERSION$JDK_VERSION$CMAKE_VERSION +# Append R version if available +USE_R35=$(echo "${CI_DOCKER_BUILD_ARG}" | egrep -o 'USE_R35=[0-9]+' | egrep -o '[0-9]+$') +if [[ ${USE_R35} == "1" ]]; then + USE_R35="_r35" +elif [[ ${USE_R35} == "0" ]]; then + USE_R35="_no_r35" +fi +DOCKER_IMG_NAME=$DOCKER_IMG_NAME$CUDA_VERSION$JDK_VERSION$CMAKE_VERSION$USE_R35 # Under Jenkins matrix build, the build tag may contain characters such as # commas (,) and equal signs (=), which are not valid inside docker image names.