-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[BREAKING] Usability improvements for the CodeBuild Construct library #412
Conversation
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!
|
||
const pipeline = new codepipeline.Pipeline(this, 'MyPipeline'); | ||
const buildStage = new codepipeline.Stage(pipeline, 'Build'); | ||
new codebuildPipeline.PipelineBuildAction(buildStage, 'CodeBuild', { | ||
project: project, | ||
project: project |
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.
No need : project
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.
Fixed.
@@ -10,12 +10,26 @@ import codebuildPipeline = require('@aws-cdk/aws-codebuild-codepipeline'); | |||
import codepipeline = require('@aws-cdk/aws-codepipeline'); | |||
|
|||
// see the @aws-cdk/aws-codebuild module for more documentation on how to create CodeBuild Projects | |||
const project = new codebuild.BuildProject( // ... | |||
); | |||
const project = new codebuild.Project(this, 'MyProject', { |
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.
Do you think there's value in walking through the layers here? Why would anyone work with this library if they don't want to use PipelineProject
?
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.
Perhaps you can switch the order of the narrative? Start with PipelineProject
and then explain that under the hood it is just a sugar for Project
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 main draw to this module is the PipelineBuildAction
(and soon the PipelineTestAction
), PipelineProject
is just a small convenience :). But sure, I've switched around the narrative to start with PipelineProject
.
1. Rename 'BuildProject' to 'Project'. 2. Allow setting the physical name of a Project, to make it consistent with other L2s. 3. Introduce a BuildImage class that makes it more convenient to specify the used Docker image. 4. Introduce a convenience PipelineProject class for use in CodePipeline that defaults the source and artifacts fields.
Thanks :) |
I would appreciate a merge if this looks good :) |
Continued from #3
By submitting this pull request, I confirm that my contribution is made under
the terms of the beta license.