-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 new google_cloudbuild_trigger
resource
#1357
add new google_cloudbuild_trigger
resource
#1357
Conversation
Will need to add a |
Are you ready for review? Ping me when you are. :) |
Patiently waiting for this to be ready :) |
Sorry for the delay. @ndmckinley, should be ready for a review now. Documentation has been added and the branch rebased against master. Travis shows an |
Great. Working on that now. The |
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.
Looks nearly perfect. Just two things that should be pulled out into their own functions for style consistency.
build.Tags = convertStringArr(v.([]interface{})) | ||
} | ||
stepCount := d.Get("build.0.step.#").(int) | ||
if stepCount > 0 { |
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'd convert this to use make unconditionally, and then append()
rather than build.Steps[s] = step
; I'm not going to insist on it. Either way, we have a pattern for these complex data structures, we like to have them in their own functions, parallel to the flatteners you already wrote (we call them expanders).
buildTrigger.Build = build | ||
} | ||
|
||
if d.Get("trigger_template.#").(int) > 0 { |
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 its own function, please. :)
And the tests passed, FYI! |
Thanks, @ndmckinley. Added expanders to match flatteners and switched to make/cap for |
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.
Testing, then will merge.
Thanks for the help, @ndmckinley 👍 |
Any plans to support github? Any plans to support the include/exclude file filters? |
@DSh3p4rd - is there an issue already open for that? |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Resource is not fully featured as the build triggers are still in beta, but allows for resources as the one used in the acceptance test. All attributes marked as ForceNew as
.Patch()
calls have failed for me for when changing just something like the description.