Skip to content
Snippets Groups Projects
Commit 26654930 authored by Chandrasekhar Ramakrishnan's avatar Chandrasekhar Ramakrishnan
Browse files

build: periodic update of data sources

parent 56d03469
No related branches found
No related tags found
No related merge requests found
...@@ -8,10 +8,14 @@ variables: ...@@ -8,10 +8,14 @@ variables:
stages: stages:
- build - build
- periodic
image_build: image_build:
stage: build stage: build
image: docker:stable image: docker:stable
except:
refs:
- schedules
before_script: before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN http://$CI_REGISTRY - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN http://$CI_REGISTRY
script: script:
...@@ -20,3 +24,43 @@ image_build: ...@@ -20,3 +24,43 @@ image_build:
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7 - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7
tags: tags:
- image-build - image-build
update_build:
stage: build
image: docker:stable
only:
refs:
- 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
tags:
- image-build
update:
stage: periodic
image:
name: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
entrypoint: [""]
only:
refs:
- schedules
script:
- git config --global user.name "CR (covid cron)"
- git config --global user.email "cramakri+covid-cron@ethz.ch"
- url_host=`git remote get-url origin | sed -e "s/https:\/\/gitlab-ci-token:.*@//g"`
- cd /tmp/
- git clone "https://gitlab-ci-token:${CI_TAG_UPLOAD_TOKEN}@${url_host}"
- cd covid-19-public-data
- git lfs install --local
- export BRANCH_NAME="update"_$(date -u +"%Y-%m-%d_%H-%M")
- PATH=$PATH:~/.local/bin
- git checkout -b $BRANCH_NAME
- renku dataset update covid-19_jhu-csse # add when ds updated: - renku dataset update openzh-covid-19 - renku dataset update covid-19-italy
- renku dataset update covid-19-tweet-ids
- renku rerun data/covidtracking/states-metadata.json data/covidtracking/states-daily.json
- renku update --with-siblings
- git push --set-upstream origin $BRANCH_NAME
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment