-
Notifications
You must be signed in to change notification settings - Fork 97
WIP: Add and configure CI for s3 full access policy module - issue 144 #210
Conversation
…ccess-policy module example.
…cess-policy module. This may not have the AWS credentials to build/deploy resources with terraform yet.
…ould help route out which one is failing on the gitlab pipeline.
…o ci-s3-full-access-policy-module
We need to re-setup the AWS user for the tests it seems but apart from that this should be complete and ready for further review. The other requirements listed out in issue #144 should be complete now:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great! We should figure out what we want this to look like as we scale out more tests/examples. I have a few comments in the PR to point those out.
set -o pipefail | ||
set -o errexit | ||
|
||
pushd "$(dirname $(basename "${0}"))/examples/s3-full-access-policy" > /dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should comment this so it's obvious to even the bash newb.
Also, this script is named tfbuild.sh
but is specific to one example. When we run CI for this, are we running a bunch of examples, or only a specific example in each job?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm adding some comments now for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this script is named tfbuild.sh but is specific to one example. When we run CI for this, are we running a bunch of examples, or only a specific example in each job?
We just have the one example at the moment. I think the best thing would be for me to change the build script name (as well as tftest.sh
and tfclean.sh
) to something specific to this example.
The other option is that when we do add other Haskell based tests for terraform-aws-foundation
we would build them in this script as well.
The question we need answered is whether we want to manually run all the examples and their Haskell test code each time or allow the tests to be run on a per example basis.
If we're running tfbuild.sh
(or similiar) in the Gitlab CI yaml with a manual action for just this example, it'd probably make more sense to rename it and keep it separate. This is if we had the aim of having different build scripts for the different examples and tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now the build step is using terraform to plan and apply the infrastructure needed for the test. So if something were to go wrong when we have more examples and tests, we'd need to address how to roll back all the infrastructure tfbuild.sh
created.
We'll need to rebase this with some git trickery, resolving a few conflicts along the way, and we can then merge. |
Closing this PR since it sounds like plan is to eventually shift all the CI for the repo to a Github Workflow (as part of changes like #320) |
- For new
modules
this would entail example code for how to use the module or some explanation in the module readme.- For new examples please provide a README explaining how to run the example. It's also ideal to provide a basic makefile to use the example as well.
Closes issue #144