From c64ea76f8153bccaab9f91bdc9f16c5e234a7072 Mon Sep 17 00:00:00 2001 From: Erik Osterman Date: Fri, 13 Oct 2017 16:30:33 -0700 Subject: [PATCH] Add Continuous Integration Tests (#9) --- .gitignore | 4 ++-- .travis.yml | 16 ++++++++++++++++ Makefile | 6 ++++++ README.md | 3 +-- 4 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 .travis.yml create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 6b88797..cf417ec 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,9 @@ *.tfstate *.tfstate.backup -# Module directory .terraform .idea *.iml -.gitignore +.build-harness +build-harness diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0bca29a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +addons: + apt: + packages: + - git + - make + - curl + +install: + - make init + +script: + - make terraform:install + - make terraform:get-plugins + - make terraform:get-modules + - make terraform:lint + - make terraform:validate diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b0f7470 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +SHELL := /bin/bash + +-include $(shell curl -sSL -o .build-harness "https://git.io/build-harness"; echo .build-harness) + +lint: + $(SELF) terraform:install terraform:get-modules terraform:get-plugins terraform:lint terraform:validate diff --git a/README.md b/README.md index 1c8f6b5..9940bb7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# terraform-null-label +# terraform-null-label [![Build Status](https://travis-ci.org/cloudposse/terraform-null-label.svg)](https://travis-ci.org/cloudposse/terraform-null-label) Terraform module designed to generate consistent label names and tags for resources. Use `terraform-null-label` to implement a strict naming convention. @@ -12,7 +12,6 @@ All [Cloud Posse modules](https://github.com/cloudposse?utf8=%E2%9C%93&q=tf_&typ -**NOTE:** The `null` refers to the primary Terraform [provider](https://www.terraform.io/docs/providers/null/index.html) used in this module. - ## Usage ### Simple Example