mirror of
https://gitlab.com/openlp/web-remote.git
synced 2024-12-22 11:32:47 +00:00
Raoul Snyman
4c73c2a50a
- Add a license file - Update package.json with some relevant information - Clean up linting - Set up better CI pipeline - Save build as artifact and pass on to deploy - Use new angular test runner - Add an empty test so that the tests pass - Use special Chromium configuration for CI - Deploy the remote to the download server when there's a new tag
49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
image: openlp/angular
|
|
|
|
stages:
|
|
- test
|
|
- build
|
|
- deploy
|
|
|
|
before_script:
|
|
- yarn install
|
|
|
|
lint:
|
|
stage: test
|
|
script:
|
|
- yarn lint
|
|
|
|
test:
|
|
stage: test
|
|
script:
|
|
- 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
|