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

Step Functions service integration for CodeBuild tasks #8043

Closed
4 tasks
shivlaks opened this issue May 18, 2020 · 6 comments · Fixed by #9757 or #10081
Closed
4 tasks

Step Functions service integration for CodeBuild tasks #8043

shivlaks opened this issue May 18, 2020 · 6 comments · Fixed by #9757 or #10081
Assignees
Labels
@aws-cdk/aws-stepfunctions-tasks effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. in-progress This issue is being actively worked on.

Comments

@shivlaks
Copy link
Contributor

AWS Step Functions recently announced support for calling CodeBuild directly from a state machine.

Use Case

It's powerful to be able to call CodeBuild as part of a state machine, specifically to manage builds as part of larger workflows.

per the what's new announcement:

Using AWS CodeBuild integration, you can easily create workflows with primitives such as branching, parallel execution, and timeouts to handle software changes from different repository branches.

AWS Step Functions supports built-in error handling, parameter passing, recommended security settings, and state management, reducing the amount of code you have to write and maintain.

Proposed Solution

Support calling CodeBuild APIs through the service integration pattern in aws-stepfunctions-tasks Full table of supported APIs is available here

  • StartBuild
  • StopBuild
  • BatchDeleteBuilds
  • BatchGetReports

This is a 🚀 Feature Request

@shivlaks shivlaks added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. @aws-cdk/aws-stepfunctions-tasks labels May 18, 2020
@nija-at nija-at added effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels May 20, 2020
@nija-at nija-at assigned shivlaks and unassigned nija-at May 26, 2020
@reisingerf
Copy link

Any update on this?
Or suggestions for possible workarounds?

We'd like to use this integration in a project in active development. A timeline (or alternative if needed) would be much appreciated.

@shivlaks shivlaks added the in-progress This issue is being actively worked on. label Jun 22, 2020
@shivlaks
Copy link
Contributor Author

@reisingerf I'm on it and will have it int' PR this week.

In terms of workaround, check out the escape hatch to use a Custom State for scenarios where CDK first class support is not available yet (for full service integrations, APIs, parameters, etc). You could create a custom task state by supplying the JSON definition of the Amazon States Language (ASL).

The Step Functions Console provides code snippets that can be generated and plugged in.

@reisingerf
Copy link

@shivlaks thanks for the update! A PR this week sounds great!

@shivlaks
Copy link
Contributor Author

shivlaks commented Jul 7, 2020

@reisingerf - ran into some delays, but haven't forgotten about this. This integration is back in focus for me and I'm actively working on it

@reisingerf
Copy link

Thanks for the update!

@DaWyz
Copy link
Contributor

DaWyz commented Aug 17, 2020

I had to call CodeBuild StartBuild in one my CDK App recently. Decided to try to implement it myself. I will surely need to do some updates on the PR I just pushed.

@mergify mergify bot closed this as completed in #9757 Aug 21, 2020
mergify bot pushed a commit that referenced this issue Aug 21, 2020
…9757)

**Implementation**

Update package `@aws-cdk/aws-stepfunctions-tasks` to include support for CodeBuild **StartBuild** API as per documentation here: https://docs.aws.amazon.com/step-functions/latest/dg/connect-codebuild.html

Includes support for the following Amazon SageMaker API calls:
* `StartBuild`

Closes #8043

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
mergify bot pushed a commit that referenced this issue Sep 1, 2020
…10081)

The execution role for the CodeBuild StartBuild task is missing permissions to check the status of the running build. It results in a timeout of the step functions.

Adding `codebuild:BatchGetBuilds` and `codebuild:BatchGetReports` following this [AWS news blog article](https://aws.amazon.com/blogs/aws/new-building-a-continuous-integration-workflow-with-step-functions-and-aws-codebuild/) solves the issue.

Closes #8043

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-stepfunctions-tasks effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. in-progress This issue is being actively worked on.
Projects
None yet
4 participants