-
Notifications
You must be signed in to change notification settings - Fork 428
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
feat(pipeline): allow additional policy to build role #3709
feat(pipeline): allow additional policy to build role #3709
Conversation
internal/pkg/manifest/pipeline.go
Outdated
Buildspec string `yaml:"buildspec,omitempty"` | ||
Image string `yaml:"image"` | ||
Buildspec string `yaml:"buildspec,omitempty"` | ||
AdditionalPolicy *AdditionalPolicy `yaml:"additional_policy,omitempty"` |
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.
what would you think about just having this as yaml.Node
or map[string]any
and marshaling it directly into the pipeline template? and just letting cloudformation do the validation?
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.
Agreed. I think right now it is pretty much the same as what CFN has (we don't do any abstraction or setting default values for them). We could just let them specify the json policy document as a string.
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.
The only thing I thought of is CFN template errors are little difficult for the customers to understand and solve that is why I kept it this way that we will guide customers with more user friendly errors.
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.
Yeah but additional policies is a pretty advanced feature and most likely those users who need to specify additional policies they already have the json policy document handy.
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.
Yay awesome, this will provide a lot more flexibility to customers! 🎉
Is it also possible to add a local integration test in for example
copilot-cli/internal/pkg/deploy/cloudformation/stack/bb_pipeline_integration_test.go
Line 25 in 1caa364
func TestBB_Pipeline_Template(t *testing.T) { |
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 great! We can after fixing the integ test
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.
just some small things but looks good!!
internal/pkg/deploy/cloudformation/stack/dd_pipeline_integration_test.go
Outdated
Show resolved
Hide resolved
Related to: [3709](#3709)
Resolves #2755
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.