Skip to content

> 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

@cheruvian

Description

@cheruvian

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions