Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Fix Travis deployment stage (#123)
Browse files Browse the repository at this point in the history
* Update .travis.yml

* Explicitly declare each unit stage

* Skip install in depoy stage

* Exclude vendor from RuboCop

* Remove CodeClimate from older Ruby unit stages

* Revert: Exclude vendor from RuboCop

* Explicitly set RuboCop configuration file

* Revert: Revert: Exclude vendor from RuboCop

* Update Travis configuration

- return unit stage to regular matrix
- use default install command
- test Terraform version 0.9.10

* Test preinstalled Ruby versions

* Fix check on Ruby version in after_success

* Use preinstall RubyGems version

* Explicitly specify RuboCop configuration 

This should avoid configurations under `vendor/`.

* Ignore `bin/` and `vendor/` in RuboCop

* Skip unwanted, inherited steps

* Replace `after_success` `skip` with `[]`

`after_success` does not support `skip`
  • Loading branch information
ncs-alane authored Jul 1, 2017
1 parent c744ff5 commit a751ce2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 30 deletions.
3 changes: 2 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ AllCops:
DefaultFormatter: clang
DisplayCopNames: true
Exclude:
- bin/*
- bin/**/*
- vendor/**/*
TargetRubyVersion: 2.2
Layout/IndentArray:
Enabled: false
Expand Down
60 changes: 31 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,38 @@ language: ruby
env:
global:
secure: qq/9kGdMj8cDjH0cNxw9azwse/8oBduDxubAw1I22mUn8qqgQT1svndISfhfv9J8VPycLUaDdbHdUHD8l4tBlfZchAZvRSRIGJkMFSlt4wcEg0af9pqD502TUyLdYIyR+QGN0UAW7DznmcsjSn/3Ka2QB/aXjoBZKJYUXcGLYWIdDzsQQysI0bULHL5ztsL41DflXKj0MD+IKm3FhGpVfR931a3nG2A67pIPBTjtvUCAxcGDYB5VTPpTru9Z5CHM7zadSFD8uArV0s3OyAOuwM5bvVdtU6AlWR/PjoUjv6QZywJ+eMYowfpvmUeMehq5wpqtf0doTFMOvbveXVQ/2euwGxxuo5Q0awbzUtCBjV1ysqgy0SBfAfdOzNE8XaU2qiBFaDGITgEFU2TyEiLcxoEFjVRvHVLn0uijDoMZ8Go615tdiYZ/G9L5ltemov5D4W1Klhux49yEiYFD914XerX5y6d8oU6KsdJhun1WKETM7uweZz30MFZ9ixIUbeDbzvWwplIskR7PJWpCmfm59CQiOlZlHsvpDYygzQTGgY8yM9VgHH7LLDctAPpFi0A3uif6cC2KcTeJIuh+g7QRk7un5ycp86T9PnB+n4Yt6ahqHJMnztU3NyCAnY3elxCw5PkgL4a/7UwVIFYRgIkaEJl4JVqb4WhTNf9s7Vm52ek=
# REVIEW: https://www.ruby-lang.org/en/downloads/branches/
rvm:
- 2.4.1
- 2.3.4
- 2.2.7
cache:
- bundler
before_install:
- gem update --system
- gem --version
install:
- bundle install --jobs=3 --retry=3
- bundle update --jobs=3 --retry=3
script:
rvm:
- 2.4.0
- 2.3.3
- 2.2.6
before_script:
- bundle exec bundle-audit check --update
script:
- bundle exec rspec
- bundle exec rubocop
after_success:
- "[ $TRAVIS_RUBY_VERSION = '2.4.1' ] && bundle exec codeclimate-test-reporter"
- "[ $TRAVIS_RUBY_VERSION = '2.4.0' ] && bundle exec codeclimate-test-reporter"
jobs:
include:
- stage: style
before_script: skip
script:
- bundle exec rubocop --config=.rubocop.yml
after_success: []
- stage: integration
sudo: required
services:
- docker
env:
- PATH="terraform:$PATH"
install:
before_install:
- cd examples/docker_provider
- bundle install --jobs=3 --retry=3 --without=development
- bundle update --jobs=3 --retry=3
- curl --output terraform.zip https://releases.hashicorp.com/terraform/0.9.8/terraform_0.9.8_linux_amd64.zip
- mkdir terraform && unzip terraform.zip -d terraform
- curl --output terraform.zip https://releases.hashicorp.com/terraform/0.9.10/terraform_0.9.10_linux_amd64.zip
- mkdir terraform
- unzip terraform.zip -d terraform
bundler_args: --without=development
before_script: skip
script:
- bundle exec kitchen test --log-level debug
after_success: []
Expand All @@ -46,12 +45,13 @@ jobs:
- docker
env:
- PATH="terraform:$PATH"
install:
before_install:
- cd examples/docker_provider
- bundle install --jobs=3 --retry=3 --without=development
- bundle update --jobs=3 --retry=3
- curl --output terraform.zip https://releases.hashicorp.com/terraform/0.8.8/terraform_0.8.8_linux_amd64.zip
- mkdir terraform && unzip terraform.zip -d terraform
- mkdir terraform
- unzip terraform.zip -d terraform
bundler_args: --without=development
before_script: skip
script:
- bundle exec kitchen test --log-level debug
after_success: []
Expand All @@ -61,18 +61,20 @@ jobs:
- docker
env:
- PATH="terraform:$PATH"
install:
before_install:
- cd examples/docker_provider
- bundle install --jobs=3 --retry=3 --without=development
- bundle update --jobs=3 --retry=3
- curl --output terraform.zip https://releases.hashicorp.com/terraform/0.7.13/terraform_0.7.13_linux_amd64.zip
- mkdir terraform && unzip terraform.zip -d terraform
- mkdir terraform
- unzip terraform.zip -d terraform
bundler_args: --without=development
before_script: skip
script:
- bundle exec kitchen test --log-level debug
after_success: []
- stage: deploy
install: []
script: []
install: skip
before_script: skip
script: skip
after_success: []
before_deploy:
- openssl aes-256-cbc -K $encrypted_8cfc0ec71995_key -iv $encrypted_8cfc0ec71995_iv -in certs/private_key.pem.enc -out certs/private_key.pem -d
Expand Down

0 comments on commit a751ce2

Please sign in to comment.