Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Best Practices
jupytext
Commits
e572696a
Commit
e572696a
authored
Feb 08, 2022
by
Cyril Matthey-Doret
Browse files
Merge branch 'ci-cron' into 'master'
Add scheduled CI job See merge request
best-practices/jupytext!1
parents
b0390d95
bf8f277a
Pipeline
#316004
canceled with stages
in 13 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
e572696a
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment