@@ -20,35 +20,25 @@ echo "--- changed paths ---"
2020echo " ${changed_paths} "
2121echo " --- --- --- --- ---"
2222
23- # by default define namespace, repo, and tag for the existing flow without changes
24- # e.g. datarobotdev/datarobot-user-models:public_dropin_envs_python3_sklearn_latest
23+ # by default set namespace, repo, and tag as
24+ # datarobot/<image_repository>:<env_version_id>
25+ # e.g. datarobot/env-python-sklearn:12355123abc918234
2526env_info=" ${ENV_FOLDER} /${FRAMEWORK} /env_info.json"
2627ENV_VERSION_ID=$( jq -r ' .environmentVersionId' ${env_info} )
2728
29+ # once we implement image promotion, change it to datarobot.
2830test_image_namespace=datarobotdev
29- test_image_repository=datarobot-user-models
30-
31- test_image_tag_base=${ENV_FOLDER} _${FRAMEWORK} _${ENV_VERSION_ID}
32- test_image_tag=${test_image_tag_base}
31+ test_image_tag=${ENV_VERSION_ID}
3332
3433changed_deps=false;
3534
36-
3735IMAGE_REPOSITORY=$( jq -r ' .imageRepository' ${env_info} )
3836if [ " ${IMAGE_REPOSITORY} " = " null" ]; then
39- echo " Image repository is not defined in env_info.json"
37+ echo " Image repository must be defined in 'imageRepository' in env_info.json"
4038else
41- # if env_info has imageRepository
42- # point test_image_namespace to datarobot
43- # point test_image_repository to defined repo
44- # point tag to ENV_VERSION_ID
4539 # e.g. datarobot/env-python-sklearn:12355123abc918234
46- echo " read ${IMAGE_REPOSITORY} "
47- # after promotion work, change to datarobot
48- test_image_namespace=datarobotdev
40+ echo " Image repo read from env_info.json: ${IMAGE_REPOSITORY} "
4941 test_image_repository=${IMAGE_REPOSITORY}
50- test_image_tag_base=${ENV_VERSION_ID}
51- test_image_tag=${ENV_VERSION_ID}
5242fi
5343
5444
@@ -58,11 +48,11 @@ if echo "${changed_paths}" | grep "${ENV_FOLDER}/${FRAMEWORK}" > /dev/null; then
5848 test_image_namespace=datarobotdev
5949 if [ -n $TRIGGER_PR_NUMBER ] && [ " $TRIGGER_PR_NUMBER " != " null" ]; then
6050 # datarobotdev/env-python-sklearn:12355123abc918234_PR_NUM
61- # or
62- # datarobotdev/datarobot-user-models:public_dropin_envs_python3_sklearn_PR_NUM
63- test_image_tag=${test_image_tag_base }
51+ # placeholder in case we want to add PR number back,
52+ # but then it will be difficult to promote
53+ test_image_tag=${test_image_tag }
6454 else
65- test_image_tag=${test_image_tag_base } _${CODEBASE_BRANCH}
55+ test_image_tag=${test_image_tag } _${CODEBASE_BRANCH}
6656 # If the test_image_tag may contain a slash, replace it with an underscore (POSIX compliant)
6757 while case $test_image_tag in * /* ) true ;; * ) false ;; esac ; do
6858 test_image_tag=${test_image_tag%%/* } _${test_image_tag#*/ }
0 commit comments