-
Notifications
You must be signed in to change notification settings - Fork 4k
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
(Pipeline and Codebuild): Using cdk can a pipeline in Account B invoke a codebuild in Account A? #13694
Comments
Thanks for opening the issue @Rmpanga . This is actually a bug in the CodeBuild library. I'm working on a fix. |
… its ARN This is needed to correctly use CodeBuild in CodePipeline (which needs to know whether the Project is from a different account/region). Fixes aws#13694
Awesome. Happy I played a small part in improving the cdk library |
Hi, just curious what is the best workaround for this issue? |
|
❓ Does cdk codepipeline support across account codebuild invocations?
The Goal
To use
codebuild.PipelineProject.from_project_arn(self, id="some_id", project_arn="arn:aws:codebuild:us-west-2:A:project/1234"
in a pipeline in Account B to invoke a codebuild project in Account A. This codebuild will run integration tests against Account A's application. The pipeline successfully deploys the application to Account A.Context
We have a Pipeline and that deploys our application in multiple accounts. For the purposes of this question lets simply the pipeline to only deploy the app to a single account A. The pipeline is deployed in Account B. After the pipeline deploys the our application to account A. We want the next step in the pipeline to invoke a codebuild project in account A to run integration tests on the application. The codebuild project for Account A is deployed as part of the
cdk deploy --all
If the above description isn't clear hopefully a code summary will clarify things.
Code
App.py - Defining the Codebuild to be deployed in Account A and the Pipeline in Account B.
codebuild.py #Defines the codebuild project
MainApp.py # The main application that will be deployed by the pipeline
codepipeline.py # The pipeline that deployes the MainApp and runs tests against it via codebuild
Problem
In the Pipeline console for the codebuild step I receive and error:
Error calling startBuild: Project cannot be found: arn:aws:codebuild:us-east-1:B:project/1234(Service: AWSCodeBuild; Status Code: 400; Error Code: ResourceNotFoundException;...)
Notice the arn? The region is should be us-west-2 but it is us-east-1. Furthermore the account should be A instead of B
Environment
Other information
The text was updated successfully, but these errors were encountered: