.gitlab-ci.yml: Add snapshots

This also enables the CI build for scheduled pipelines so these can be
run on a daily basis.
merge-requests/1/head
Olaf Meeuwissen 2018-02-17 21:17:47 +09:00
rodzic 62663f853f
commit 0caeabee87
1 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -1,13 +1,24 @@
image: alpine:latest
variables:
URL: https://gitlab.com/$CI_PROJECT_NAMESPACE
pages:
stage: deploy
script:
- mkdir .public
- mv * .public/
- mv .public public
- mkdir public/snapshots
- wget --quiet -O public/snapshots/sane-backends-git$(date +%F).tar.gz $URL/backends/repository/master/archive.tar.gz
- wget --quiet -O public/snapshots/sane-frontends-git$(date +%F).tar.gz $URL/frontends/repository/master/archive.tar.gz
- wget --quiet -O backends.zip $URL/backends/-/jobs/artifacts/master/download?job=archive
- unzip -oqd public/snapshots backends.zip
- wget --quiet -O frontends.zip $URL/frontends/-/jobs/artifacts/master/download?job=archive
- unzip -oqd public/snapshots frontends.zip
artifacts:
paths:
- public
only:
- master
- schedules