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

> For some reason publishAssetsInParallel must be set true though (default). Otherwiese got "This BuildSpec contains CloudFormation references and is supported by publishInParallel=false" and the build failed. #29028

Open
cheruvian opened this issue Feb 8, 2024 · 0 comments
Labels
@aws-cdk/pipelines CDK Pipelines library bug This issue is a bug. effort/medium Medium work item – several days of effort needs-review p2

Comments

@cheruvian
Copy link
Contributor

cheruvian commented Feb 8, 2024

For some reason publishAssetsInParallel must be set true though (default). Otherwise got "This BuildSpec contains CloudFormation references and is supported by publishInParallel=false" and the build failed.

Just banged my head on this for 4 7 hours today... -_- This has to be a bug right?

Originally posted by @cheruvian in #10999 (comment)

CDK Pipelines (CodePipeline) fails if you add CloudFormation references (for example with dockerCredentials) and publishAssetsInParallel=false.

It looks like this is caused here:

      // If we use a single publisher, pass buildspec via file otherwise it'll
      // grow too big.
      passBuildSpecViaCloudAssembly: this.singlePublisherPerAssetType,

This is then used in the CodePipelineFactory

if (this.props.passBuildSpecViaCloudAssembly) {
     ...
      if (typeof fileContents !== 'string') {
        throw new Error(`This BuildSpec contains CloudFormation references and is supported by publishInParallel=false: ${JSON.stringify(fileContents, undefined, 2)}`);
      }
     ...
    } else {
      projectBuildSpec = actualBuildSpec;
    }

So tl;dr; seems as though

  1. Deploying BuildSpec via CloudAssembly is not possible (this makes sense)
  2. BuildSpecs are passed via CloudAssembly only if singlePublisherPerAssetType (this maybe makes sense?)
  3. singlePublisherPerAssetType is only set if publishAssetsInParallel is true (this doesn't make sense necessarily?)

FWIW setting publishAssetsInParallel=false is the recommendation from the `aws-deployment-pipeline-reference-architecture

@tim-finnigan tim-finnigan added bug This issue is a bug. p2 @aws-cdk/pipelines CDK Pipelines library needs-review effort/medium Medium work item – several days of effort labels Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/pipelines CDK Pipelines library bug This issue is a bug. effort/medium Medium work item – several days of effort needs-review p2
Projects
None yet
Development

No branches or pull requests

2 participants