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(scheduler-targets): add CodePipeline as target for scheduler #27799

Merged
merged 23 commits into from
Dec 18, 2023
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
🐛 Removes splitting of arn
  • Loading branch information
daschaa committed Nov 30, 2023
commit 76613f8c3ce6c31ee0e5c032334e71658448b606
Original file line number Diff line number Diff line change
@@ -17,9 +17,8 @@ export class CodePipelineStartPipelineExecution extends ScheduleTargetBase imple
}

protected addTargetActionToRole(schedule: ISchedule, role: IRole): void {
const pipelineArn = Arn.split(this.pipeline.pipelineArn, ArnFormat.NO_RESOURCE_NAME);
const region = pipelineArn.region ?? '';
const account = pipelineArn.account ?? '';
const region = this.pipeline.env.region ?? '';
const account = this.pipeline.env.account ?? '';

if (!sameEnvDimension(region, schedule.env.region)) {
throw new Error(`Cannot assign pipeline in region ${region} to the schedule ${Names.nodeUniqueId(schedule.node)} in region ${schedule.env.region}. Both the schedule and the pipeline must be in the same region.`);