Commit c89e6381 authored by Cyril Matthey-Doret's avatar Cyril Matthey-Doret
Browse files

Add scheduled update in .gitlab-ci.yml file

parent b0390d95
Pipeline #315637 canceled with stage
......@@ -5,6 +5,7 @@ variables:
stages:
- build
- pull_upstream
image_build:
stage: build
......@@ -14,4 +15,36 @@ image_build:
script: |
CI_COMMIT_SHA_7=$(echo $CI_COMMIT_SHA | cut -c1-7)
docker build --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7 .
docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7
\ No newline at end of file
docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7
pull_jupytext_github:
stage: pull_upstream
script: |
whoami
printenv
CI_PUSH_REPO=$(echo $CI_REPOSITORY_URL | perl -pe 's#.*@(.+?(\:\d+)?)/#git@\1:#')
git remote set-url --push origin "${CI_PUSH_REPO}"
git config user.name "Gitlab CI"
git config user.email "tokenowner@email.com"
# runner runs on a detached HEAD, create a temporary local branch for editing
git checkout -b ci_processing
# update jupytext submodule
git submodule foreach git pull origin main
git add jupytext
git commit -m "sync: jupytext@$(git submodule status | sed 's/^ *//' | head -c8)"
# push changes
# always return true so that the build does not fail if there are no changes
git push origin ci_processing:${CI_BUILD_REF_NAME} || true
only:
refs:
- schedules
variables:
- $SCHEDULE_TYPE == "check_upstream"
allow_failure: false
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment