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:
|
|
|
|
- cd dist/web-remote
|
|
|
|
- zip -r ../../remote-$CI_COMMIT_TAG.zip *
|
|
|
|
- cd ../../
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
|
|
|
- chmod 600 ~/.ssh/id_rsa
|
|
|
|
- eval $(ssh-agent -s)
|
|
|
|
- ssh-add ~/.ssh/id_rsa
|
|
|
|
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
|
|
|
- ssh openlp@openlp.io "mkdir -p /home/openlp/sites/get.openlp.org/www/remote/$CI_COMMIT_TAG"
|
|
|
|
- scp remote-$CI_COMMIT_TAG.zip openlp@openlp.io:/home/openlp/sites/get.openlp.org/www/remote/$CI_COMMIT_TAG/
|
|
|
|
only:
|
|
|
|
- tags
|
|
|
|
- master@openlp/web-remote
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- remote-*.zip
|