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

Merge branch 'ci-cron' into 'master'

Add scheduled CI job

See merge request !1
parents b0390d95 bf8f277a
Pipeline #316004 canceled with stages
in 13 seconds
......@@ -5,13 +5,50 @@ variables:
stages:
- build
- update
image_build:
stage: build
image: docker:stable
except:
- schedules
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN http://$CI_REGISTRY
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
image_build_for_update:
stage: build
image: docker:stable
only:
- schedules
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN http://$CI_REGISTRY
script: |
docker build --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA .
docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
update_jupytext:
stage: update
image:
name: $$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
entrypoint: ['']
only:
- schedules
before_script:
- git config --global user.name ${GITLAB_USER_NAME}
- git config --global user.email ${GITLAB_USER_EMAIL}
- renku clone https://oauth2:${CI_PERSONAL_TOKEN}@renkulab.io/gitlab/${CI_PROJECT_PATH}.git /tmp/${CI_COMMIT_SHORT_SHA}
- cd /tmp/${CI_COMMIT_SHORT_SHA}
script: |
git submodule update --init --recursive
git submodule update --remote
after_script:
- cd /tmp/${CI_COMMIT_SHORT_SHA}
- renku save -m "sync jupytext@$(git submodule status | cut -c2-9)" jupytext
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