Commit 3265c7d6 authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

per branch and per commit deployment

parent 4b396422
......@@ -5,12 +5,12 @@ cache:
stages:
- build
- deploy
- preserve-pages
build:
image: node:latest
image: docker.gitlab.gwdg.de/subugoe/emo/qviewer/node:latest
stage: build
script:
- npm install --global @quasar/cli
- npm install
- quasar build
artifacts:
......@@ -18,18 +18,36 @@ build:
- dist/
pages:
image: node:latest
image: docker.gitlab.gwdg.de/mgoebel/swiss_knife/fedora:latest
# at the very early stage lets deploy for every branch
# only:
# - master
# - develop
stage: deploy
cache:
untracked: true
paths:
- public
when: always
script:
- cp --remove-destination --recursive dist/* public
- curl $(base64 --decode <<< ${wannaBeBlob})/data.tar.gz --output data.tar.gz
- tar -xzf data.tar.gz
- mkdir -p public/${CI_COMMIT_SHORT_SHA}
- cp --remove-destination --recursive dist/spa/* public/${CI_COMMIT_SHORT_SHA}
- mkdir -p public/${CI_COMMIT_REF_SLUG}
- cp --remove-destination --recursive dist/spa/* public/${CI_COMMIT_REF_SLUG}
artifacts:
name: "$CI_COMMIT_SHORT_SHA"
paths:
- public
pushback:
image: docker.gitlab.gwdg.de/mgoebel/swiss_knife/fedora:latest
stage: preserve-pages
script:
- tar -czf data.tar.gz public
- lftp -c "set ssl:verify-certificate no && open $(base64 --decode <<< ${wannaBeBlob}) && put data.tar.gz -o test.tar.gzad"
.production:
image: node:latest
only:
......
......@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
- Pages deployment on per commit and per branch base
## [0.0.1] - 2020-05-14
### Added
......
FROM node:latest
RUN npm install --global @quasar/cli
\ No newline at end of file
......@@ -2,8 +2,9 @@
Viewer for the modular framework to present digital editions.
Demo: https://subugoe.pages.gwdg.de/emo/Qviewer/
Demo: https://subugoe.pages.gwdg.de/emo/Qviewer/develop
(for newer branches the demo is deployed in a directory named with branch name lowercased, shortened to 63 bytes, and with everything except `0-9` and `a-z` replaced with `-` (CI_COMMIT_REF_SLUG). Also the commit short hash can be used to see a demo.
## Getting Started
......@@ -58,3 +59,10 @@ See [Configuring quasar.conf.js](https://quasar.dev/quasar-cli/quasar-conf-js).
## Authors
See the list of [contributors](https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/graphs/develop) who participated in this project.
## Dockerfile
The dockerfile is used at GitLab CI. It needs to be updated, when either node or quasar-cli should be updated.
```
docker build --pull -t docker.gitlab.gwdg.de/subugoe/emo/qviewer/node .
docker push docker.gitlab.gwdg.de/subugoe/emo/qviewer/node
```
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