in cdk_pipelines/cdk_pipelines.py [0:0]
def __init__(self, scope: cdk.Construct, construct_id: str, **kwargs) -> None:
super().__init__(scope, construct_id, **kwargs)
hub_account = self.node.try_get_context("hub_account")
hub_region = self.node.try_get_context("region")
repo = codecommit.Repository(self, "Repo", repository_name = "service-catalog-repo", description="CDK Code with Service Catalog products")
pipeline = pipelines.CodePipeline(self, "Pipeline",
pipeline_name=f'cdk-service-catalog-pipeline',
synth=pipelines.ShellStep("Synth",
input=pipelines.CodePipelineSource.code_commit(repo,"main"),
commands=[ "npm install -g aws-cdk && pip install -r requirements.txt", "cdk synth"]
))
wave = pipeline.add_wave("HubAccount")
wave.add_stage(
ECSServiceCatalog(
self,
'ECS',
env={
'account': hub_account,
'region': hub_region
}
)
)
wave.add_stage(
StorageServiceCatalog(
self,
'Storage',
env={
'account': hub_account,
'region': hub_region
}
)
)
# General tags applied to all resources created on this scope (self)
cdk.Tags.of(self).add("key", "value")