mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-17 23:13:46 +01:00
58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
language: ruby
|
|
sudo: required
|
|
dist: trusty
|
|
|
|
services:
|
|
- docker
|
|
|
|
rvm:
|
|
- 2.4.4
|
|
|
|
env:
|
|
global:
|
|
- AWS_REGION='us-east-1'
|
|
- TF_VAR_region=${AWS_REGION}
|
|
- TF_WARN_OUTPUT_ERRORS=1
|
|
|
|
before_install:
|
|
- echo "before_install"
|
|
|
|
install:
|
|
- echo "install"
|
|
- gem install bundler --no-rdoc --no-ri
|
|
- bundle install
|
|
|
|
before_script:
|
|
- export LATEST_TERRAFORM_VERSION=$(curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d '"' -f 4 | cut -c2-)
|
|
- curl --silent --output terraform.zip https://releases.hashicorp.com/terraform/${LATEST_TERRAFORM_VERSION}/terraform_${LATEST_TERRAFORM_VERSION}_linux_amd64.zip
|
|
- sha256sum terraform.zip | grep "84ccfb8e13b5fce63051294f787885b76a1fedef6bdbecf51c5e586c9e20c9b7"
|
|
- unzip terraform.zip ; rm -f terraform.zip; chmod +x terraform
|
|
- mkdir -p ${HOME}/bin ; export PATH=${PATH}:${HOME}/bin; mv terraform ${HOME}/bin/
|
|
- terraform -v
|
|
|
|
script:
|
|
- echo 'script'
|
|
- terraform init
|
|
- terraform fmt -check=true
|
|
- terraform validate -var "region=${AWS_REGION}" -var "vpc_id=vpc-123456" -var "subnets=[\"subnet-12345a\"]" -var "workers_ami_id=ami-123456" -var "cluster_ingress_cidrs=[]" -var "cluster_name=test_cluster"
|
|
# - docker run --rm -v $(pwd):/app/ --workdir=/app/ -t wata727/tflint --error-with-issues
|
|
- cd examples/eks_test_fixture
|
|
- terraform init
|
|
- terraform fmt -check=true
|
|
- terraform validate
|
|
- cd -
|
|
- terraform -v
|
|
# - bundle exec kitchen test --destroy always
|
|
# deploy:
|
|
# provider: script
|
|
# script: ci/deploy.sh
|
|
# on:
|
|
# branch: master
|
|
|
|
notifications:
|
|
email:
|
|
recipients:
|
|
- brandon@atscale.run
|
|
on_success: change
|
|
on_failure: change
|