Example Travis file for verifying CloudFormation templates
language: ruby
git:
submodules: false
env:
global:
- AWS_DEFAULT_REGION=eu-west-1
- secure: somestring
- secure: somestring
before_install:
- echo "Installing AWS CLI"
- pip install --upgrade --user awscli
- echo "Installing test gems"
- gem install yaml-lint
install: true
script:
- aws cloudformation validate-template --template-body file://cloudformation/my-template.yml
- yaml-lint cloudformation/my-template.yml
after_success:
- echo "Test Success - Branch($TRAVIS_BRANCH) Pull Request($TRAVIS_PULL_REQUEST) Tag($TRAVIS_TAG)"
- echo "Cloudformation template validated"
- echo "YAML linted"
notifications:
slack: chefio:bLaHbLaHbLaHbLaHbLaHbLaH
email: false