2021-01-13 07:10:27 -05:00
|
|
|
before_script:
|
|
|
|
- bundle install
|
|
|
|
- bundle exec rake db:create
|
|
|
|
|
2020-12-04 13:09:55 -05:00
|
|
|
rspec 0 1:
|
|
|
|
stage: build
|
|
|
|
script: 'rake spec'
|
|
|
|
needs: []
|
2021-01-13 07:10:27 -05:00
|
|
|
tags:
|
|
|
|
- ruby
|
|
|
|
- postgres
|
|
|
|
only:
|
|
|
|
- branches
|
|
|
|
- master
|
2020-12-04 13:09:55 -05:00
|
|
|
|
|
|
|
rspec 0 2:
|
|
|
|
stage: build
|
2021-01-13 07:10:27 -05:00
|
|
|
allow_failure: true
|
2020-12-04 13:09:55 -05:00
|
|
|
script: 'rake spec'
|
2021-01-13 07:10:27 -05:00
|
|
|
when: on_failure
|
2020-12-04 13:09:55 -05:00
|
|
|
needs: []
|
|
|
|
|
|
|
|
spinach:
|
|
|
|
stage: build
|
|
|
|
script: 'rake spinach'
|
|
|
|
needs: []
|
2021-01-13 07:10:27 -05:00
|
|
|
except:
|
|
|
|
- tags
|
2020-12-04 13:09:55 -05:00
|
|
|
|
2021-01-13 07:10:27 -05:00
|
|
|
deploy_job:
|
|
|
|
stage: deploy
|
|
|
|
script:
|
|
|
|
- echo 'done'
|
|
|
|
environment:
|
|
|
|
name: production
|
2020-12-04 13:09:55 -05:00
|
|
|
docker:
|
|
|
|
stage: test
|
|
|
|
script: 'curl http://dockerhub/URL'
|
|
|
|
needs: [spinach, rspec 0 1]
|
2021-01-13 07:10:27 -05:00
|
|
|
when: manual
|
|
|
|
except:
|
|
|
|
- branches
|
|
|
|
|
|
|
|
after_script:
|
|
|
|
- echo 'run this after'
|