lyang/saml-proxy

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
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