Skip to content
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(codepipeline-actions): support executeBatchBuild on CodeBuildAction #11741

Merged
merged 7 commits into from
Dec 3, 2020

Conversation

tjenkinson
Copy link
Contributor

See this doc which says

To enable batch builds in CodePipeline, set the BatchEnabled parameter of the configuration object to true.

The configuration object it is referring to is this.

I didn't add a test to ensure that BatchEnabled is not present by default because I wasn't sure exactly how to do this. Let me know if this is needed. It looks like haveResourceLike can take a function on properties, so maybe it's doable with that?

Closes #11662

@gitpod-io
Copy link

gitpod-io bot commented Nov 26, 2020

@mergify
Copy link
Contributor

mergify bot commented Nov 26, 2020

Title does not follow the guidelines of Conventional Commits. Please adjust title before merge.

@tjenkinson tjenkinson changed the title feat(aws-codepipeline-actions) support batchEnabled on CodeBuildAction feat(aws-codepipeline-actions): support batchEnabled on CodeBuildAction Nov 26, 2020
@tjenkinson tjenkinson marked this pull request as ready for review November 26, 2020 22:00
@skinny85 skinny85 changed the title feat(aws-codepipeline-actions): support batchEnabled on CodeBuildAction feat(codepipeline-actions): support batchEnabled on CodeBuildAction Nov 30, 2020
Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the great contribution @tjenkinson ! A few minor comments.

packages/@aws-cdk/aws-codepipeline-actions/README.md Outdated Show resolved Hide resolved
@@ -176,6 +183,9 @@ export class CodeBuildAction extends Action {
// lazy, because the Artifact name might be generated lazily
configuration.PrimarySource = cdk.Lazy.string({ produce: () => this.props.input.artifactName });
}
if (this.props.batchEnabled) {
configuration.BatchEnabled = 'true';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we 100% certain this should be a String, and not a Boolean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the example on https://docs.aws.amazon.com/codebuild/latest/userguide/sample-pipeline-batch.html it's a string, which is a bit strange given it's JSON 🤷‍♂️

Co-authored-by: Adam Ruka <adamruka85@gmail.com>
@mergify mergify bot dismissed skinny85’s stale review November 30, 2020 21:03

Pull request has been modified.

@tjenkinson tjenkinson changed the title feat(codepipeline-actions): support batchEnabled on CodeBuildAction feat(codepipeline-actions): support executeBatchBuild on CodeBuildAction Nov 30, 2020
Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for the contribution @tjenkinson !

@mergify
Copy link
Contributor

mergify bot commented Dec 3, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 145cf47
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Dec 3, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 3dcd1a8 into aws:master Dec 3, 2020
mergify bot pushed a commit that referenced this pull request Dec 24, 2020
…executeBatchBuild: true` (#12181)

If the `executeBatchBuild` prop is added to trigger a batch build, we also need to switch the IAM permissions to the ones which allow triggering a batch build. This does that.

This should probably have been part of #11741
flochaz pushed a commit to flochaz/aws-cdk that referenced this pull request Jan 5, 2021
…executeBatchBuild: true` (aws#12181)

If the `executeBatchBuild` prop is added to trigger a batch build, we also need to switch the IAM permissions to the ones which allow triggering a batch build. This does that.

This should probably have been part of aws#11741
mergify bot pushed a commit that referenced this pull request Feb 12, 2021
…tch builds (#13018)

My mistake in #11741 🤦 

For batch builds the pipeline needs `codebuild:BatchGetBuildBatches`, not `codebuild:BatchGetBuilds`
NovakGu pushed a commit to NovakGu/aws-cdk that referenced this pull request Feb 18, 2021
…tch builds (aws#13018)

My mistake in aws#11741 🤦 

For batch builds the pipeline needs `codebuild:BatchGetBuildBatches`, not `codebuild:BatchGetBuilds`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[aws-codepipeline] ActionDeclaration - Support BatchEnabled configuration
3 participants