2019-10-06 00:28:36 +00:00
|
|
|
image: openlp/angular
|
2018-08-23 06:36:44 +00:00
|
|
|
|
2019-10-06 00:28:36 +00:00
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
- build
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- yarn install
|
|
|
|
|
|
|
|
lint:
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- yarn lint
|
|
|
|
|
|
|
|
test:
|
2018-08-23 06:36:44 +00:00
|
|
|
stage: test
|
|
|
|
script:
|
2019-10-06 00:28:36 +00:00
|
|
|
- yarn test --no-progress --no-watch --browsers=ChromiumHeadlessCI
|
|
|
|
|
|
|
|
build:
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- yarn build --no-progress --prod --aot
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- dist/
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
stage: deploy
|
|
|
|
script:
|
2020-01-31 06:38:08 +00:00
|
|
|
- if [[ "$CI_COMMIT_TAG" == "" ]]; then exit 0; fi
|
2019-10-06 00:28:36 +00:00
|
|
|
- cd dist/web-remote
|
|
|
|
- zip -r ../../remote-$CI_COMMIT_TAG.zip *
|
2020-01-31 06:38:08 +00:00
|
|
|
- d ../../
|
|
|
|
- cho "$CI_COMMIT_TAG" > version.txt
|
|
|
|
- kdir -p ~/.ssh
|
|
|
|
- cho "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
|
|
|
- hmod 600 ~/.ssh/id_rsa
|
|
|
|
- val $(ssh-agent -s)
|
|
|
|
- sh-add ~/.ssh/id_rsa
|
|
|
|
- '[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
|
|
|
- sh openlp@openlp.io "mkdir -p /home/openlp/sites/get.openlp.org/www/remote/$CI_COMMIT_TAG"
|
|
|
|
- cp version.txt remote-$CI_COMMIT_TAG.zip openlp@openlp.io:/home/openlp/sites/get.openlp.org/www/remote/$CI_COMMIT_TAG/
|