Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add travis integration #15

Merged
merged 6 commits into from
Jan 21, 2020

Conversation

KenFigueiredo
Copy link
Contributor

@KenFigueiredo KenFigueiredo commented Jan 17, 2020

In order to improve the quality of our code base and more easily ensure that any change added to our codebase doesn't break it, we should add a Travis CI job to run terraform validate on any PR that is opened against master for Beekeeper-Terraform

Note: This won't currently run on this repository until merged, but here is the result in my fork: KenFigueiredo#1

- mv /tmp/terraform ~/bin
- export PATH="~/bin:$PATH"
- export TF_INPUT=false
- export AWS_DEFAULT_REGION="us-east-1"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set AWS_DEFAULT_REGION as per hashicorp/terraform#21408 (comment) to not fail on implicit provider defaults.

script:
- cd $TERRAFORM_DIR
- terraform init
- terraform validate
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Travis build matrix to effectively run a pipeline that validates the main & lambda dirs in this repository

@KenFigueiredo KenFigueiredo requested review from massdosage and max-jacobs and removed request for massdosage and max-jacobs January 17, 2020 22:20
.travis.yml Outdated Show resolved Hide resolved
.travis.yml Outdated Show resolved Hide resolved
@@ -0,0 +1,24 @@

dist: bionic
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for going with a particular release of Ubuntu? We've usually just set the os to linux and used what Travis defaults to for this but there have been some cases where we've had to use a specific version (e.g. for Java 7 usage).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason in particular other than it's equivalent to the latest version of ubuntu available in travis and to be more explicit in what we call out for the build environment. When we call out linux it looks like it should default to what Travis has set as the default linux image (The current default is ubuntu 16.04)

Copy link
Contributor

@max-jacobs max-jacobs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to make sense, but don't know much about travis so will defer to @massdosage

@massdosage massdosage merged commit 322712f into ExpediaGroup:master Jan 21, 2020
@massdosage
Copy link
Contributor

OK, this should all work now, I've set it up in Travis and triggered a build of master which seems to have worked (https://travis-ci.com/ExpediaGroup/beekeeper-terraform/builds/145387767). Let's keep an eye on the next PR...

@KenFigueiredo KenFigueiredo deleted the add-travis-integration branch January 21, 2020 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants