Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# renku: v1.dev20180723
variables:
GIT_STRATEGY: fetch
GIT_SSL_NO_VERIFY: "true"
GIT_SUBMODULE_STRATEGY: recursive
GIT_LFS_SKIP_SMUDGE: 1
stages:
- build
- periodic
image_build:
stage: build
image: docker:stable
except:
refs:
- 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
tags:
- 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-update .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA-update
tags:
- image-build
update:
stage: periodic
image:
name: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA-update
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
- renku dataset add covid-19_jhu-csse --force --source csse_covid_19_data/csse_covid_19_daily_reports https://github.com/CSSEGISandData/COVID-19.git
- renku dataset update covid-19-tweet-ids
- renku dataset update openzh-covid-19
- renku dataset update covid-19-italy
- renku dataset add covid-19-chile -s data/*.csv -s data/covid19_chile.rds https://github.com/itoledor/coronavirus.git --force
- renku rerun data/covidtracking/states-metadata.json data/covidtracking/states-daily.json
- renku update --with-siblings
- git push --set-upstream origin $BRANCH_NAME