feat(deploy): add manually triggerable ci job to deploy to staging

parent f4863c49
......@@ -7,23 +7,29 @@ image: git.panter.ch:5001/open-source/aoz-003/gitlab_ci:2.6.6
stages:
- test
- deploy
services:
- postgres:9.6
variables:
RAILS_ENV: test
POSTGRES_DB: aoz_test
DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/$POSTGRES_DB'
POSTGRES_HOST_AUTH_METHOD: trust
.test-job-extends:
services:
- postgres:9.6
variables:
RAILS_ENV: test
POSTGRES_DB: aoz_test
DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/$POSTGRES_DB'
POSTGRES_HOST_AUTH_METHOD: trust
artifacts:
paths:
- 'coverage/'
expire_in: 30 days
reports:
junit: coverage/coverage.xml
lint:
stage: test
retry: 0
extends:
- .cache-pull-push
- .retry-dropped-runners
- .bundle-yarn-install-webdrivers-chrome
- .test-job-extends
script:
- bundle exec rails db:schema:load # some RuboCop cops require it
- yarn lint:js
......@@ -32,17 +38,14 @@ lint:
test:
stage: test
retry: 0
extends:
- .cache-pull
- .retry-dropped-runners
- .bundle-yarn-install
- .test-job-extends
script:
- bundle exec rails db:schema:load
- bundle exec rails test
artifacts:
reports:
cobertura: coverage/coverage.xml
system:
stage: test
......@@ -54,9 +57,16 @@ system:
- .retry-dropped-runners
- .bundle-yarn-install-webdrivers-chrome
- .capybara-screenshot-artifacts
- .test-job-extends
script:
- bundle exec rails db:schema:load
- bundle exec rails test:system
artifacts:
reports:
cobertura: coverage/coverage.xml
deploy-staging:
stage: deploy
script:
- gem install dpl
- dpl --provider=heroku --app=staging-aoz-freiwillige --api-key=$HEROKU_STAGING_API_KEY
only:
- develop
when: manual
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