Last active
November 12, 2021 07:12
-
-
Save alexpulver/8f1225d15266ee74d9862be88fd5382f to your computer and use it in GitHub Desktop.
Enable CodeBuild cache for CDK Pipelines synth step
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
synth_codebuild_step = pipelines.CodeBuildStep(...) | |
codepipeline = pipelines.CodePipeline( | |
self, | |
"CodePipeline", | |
synth=synth_codebuild_step, | |
) | |
# That should be called at the end of the pipeline definition, because the pipeline can't be changed afterwards | |
codepipeline.build_pipeline() | |
synth_cfn_project: codebuild.CfnProject = codepipeline.synth_project.node.default_child | |
synth_cfn_project.cache = codebuild.CfnProject.ProjectCacheProperty(type="LOCAL", modes=["LOCAL_SOURCE_CACHE"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment