-
Notifications
You must be signed in to change notification settings - Fork 696
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
App Infra pipelines #337
App Infra pipelines #337
Conversation
@@ -0,0 +1,44 @@ | |||
# Copyright 2021 Google LLC |
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.
It might be worthwhile thinking about sharing the image/s created in bootstrap rather than building specific image per app infra project, so it is consistent throughout the foundation and less to maintain.
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.
ack, I have opened terraform-google-modules/terraform-google-bootstrap#91 to track
@@ -22,8 +22,11 @@ steps: | |||
args: | |||
- -c | |||
- | | |||
echo "Setting up gcloud for impersonation" | |||
gcloud config set auth/impersonate_service_account ${_TF_SA_EMAIL} | |||
tf_sa_email=${_TF_SA_EMAIL} |
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.
we could probably just use the substitution directly, rather than setting to a variable first
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 was initially trying to use it directly like if [[ -n ${_TF_SA_EMAIL} ]]; then
, but if _TF_SA_EMAIL
is not set (in the case of app infra pipelines) cloudbuild fails to start build and complains about a missing substitution. I tried this as a workaround which seemed to work.
echo "Setting up gcloud for impersonation" | ||
gcloud config set auth/impersonate_service_account ${_TF_SA_EMAIL} | ||
tf_sa_email=${_TF_SA_EMAIL} | ||
if [[ -n ${tf_sa_email} ]]; then |
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.
same as comment for apply.yaml
@@ -22,8 +22,11 @@ steps: | |||
args: | |||
- -c | |||
- | | |||
echo "Setting up gcloud for impersonation" | |||
gcloud config set auth/impersonate_service_account ${_TF_SA_EMAIL} | |||
tf_sa_email=${_TF_SA_EMAIL} |
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 it looks like this substitution won't be available for app infra triggers?
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.
Correct, that was my reason for wrapping in a if statement
Overall looking good @bharathkkb, nice work! A few small things to look at, not sure whether we need to build an image per app infra project and could cause some confusion / drift vs the image used for the overall foundation. |
Thanks for the review @rjerrems |
@rjerrems I will expose an option to use the foundation runner image in GAR once we have a new bootstrap release |
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.
LGTM - Lets just confirm tests are working prior to merge.
* initial impl * add tests * fmt * address comments * fix checksums for 0.13.6 * fix validator version * update readmes * update docs
* initial impl * add tests * fmt * address comments * fix checksums for 0.13.6 * fix validator version * update readmes * update docs
* initial impl * add tests * fmt * address comments * fix checksums for 0.13.6 * fix validator version * update readmes * update docs
* initial impl * add tests * fmt * address comments * fix checksums for 0.13.6 * fix validator version * update readmes * update docs
fixes #316
TODO: