forked from lyang/saml-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
26 lines (26 loc) · 1.03 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
language: ruby
services:
- docker
before_install:
- gem install bundler
cache: bundler
jobs:
include:
- stage: test
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script: bundle exec rspec
after_script:
- ./cc-test-reporter format-coverage coverage/.resultset.json --input-type simplecov --output coverage/codeclimate.json
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- stage: tag by commit
script:
- echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin
- ./deploy.sh $DOCKERHUB_REPO $TRAVIS_COMMIT https://github.com/$TRAVIS_REPO_SLUG
- stage: tag by version
if: branch = master
script:
- echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin
- ./deploy.sh $DOCKERHUB_REPO 1.0 https://github.com/$TRAVIS_REPO_SLUG