File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,9 @@ pipeline {
1515 GIT_COMMIT_AUTHOR = sh(returnStdout : true , script :" git log --format='%an' -n 1 HEAD" ). trim()
1616 GIT_COMMIT_SUMMARY = " `<https://github.com/Kaggle/docker-python/commit/${ GIT_COMMIT} |${ GIT_COMMIT_SHORT} >` ${ GIT_COMMIT_SUBJECT} - ${ GIT_COMMIT_AUTHOR} "
1717 MATTERMOST_CHANNEL = sh(returnStdout : true , script : " if [[ \" ${ GIT_BRANCH} \" == \" main\" ]]; then echo \" #kernelops\" ; else echo \" #builds\" ; fi" ). trim()
18- PRETEST_TAG = sh(returnStdout : true , script : " if [[ \" ${ GIT_BRANCH} \" == \" main\" ]]; then echo \" ci-pretest\" ; else echo \" ${ GIT_BRANCH} -pretest\" ; fi" ). trim()
19- STAGING_TAG = sh(returnStdout : true , script : " if [[ \" ${ GIT_BRANCH} \" == \" main\" ]]; then echo \" staging\" ; else echo \" ${ GIT_BRANCH} -staging\" ; fi" ). trim()
18+ // Use dev branch names as tags, but replace '/' with '-' using sed since docker images don't support forward slash
19+ PRETEST_TAG = sh(returnStdout : true , script : " if [[ \" ${ GIT_BRANCH} \" == \" main\" ]]; then echo \" ci-pretest\" ; else echo \" ${ GIT_BRANCH} -pretest\" | sed 's/\/ /-/g'; fi" ). trim()
20+ STAGING_TAG = sh(returnStdout : true , script : " if [[ \" ${ GIT_BRANCH} \" == \" main\" ]]; then echo \" staging\" ; else echo \" ${ GIT_BRANCH} -staging\" | sed 's/\/ /-/g'; fi" ). trim()
2021 }
2122
2223 stages {
Original file line number Diff line number Diff line change 77url_pattern = re .compile (r"https?://([a-z]+\.)?kaggle.com/models/(?P<owner>[^\\/]+)/(?P<model>[^\\/]+)/frameworks/(?P<framework>[^\\/]+)/variations/(?P<variation>[^\\/]+)/versions/(?P<version>[0-9]+)$" )
88
99def _is_on_kaggle_notebook ():
10- return os .getenv ("KAGGLE_KERNEL_RUN_TYPE" ) != None
10+ return os .getenv ("KAGGLE_KERNEL_RUN_TYPE" ) != None and os . getenv ( "KAGGLE_USER_SECRETS_TOKEN" ) != None
1111
1212def _is_kaggle_handle (handle ):
1313 return url_pattern .match (handle ) != None
You can’t perform that action at this time.
0 commit comments