@cdklabs/cdk-cicd-wrapper 2.3.2 → 2.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/.jsii +759 -197
  2. package/API.md +526 -45
  3. package/README.md +11 -0
  4. package/lib/app/DeploymentPipelineApp.js +7 -3
  5. package/lib/app/PipelineApp.js +12 -4
  6. package/lib/appconfig/accessor.js +1 -1
  7. package/lib/config/build-image.d.ts +17 -1
  8. package/lib/config/build-image.js +57 -3
  9. package/lib/config/default-synthesizer-role-arn.d.ts +38 -0
  10. package/lib/config/default-synthesizer-role-arn.js +63 -0
  11. package/lib/config/define.d.ts +50 -1
  12. package/lib/config/define.js +117 -6
  13. package/lib/config/naming.d.ts +7 -2
  14. package/lib/config/naming.js +9 -9
  15. package/lib/config/repository.js +1 -1
  16. package/lib/config/types.d.ts +123 -11
  17. package/lib/config/types.js +6 -2
  18. package/lib/engine/cdkpipelines/CdkPipelinesEngine.d.ts +6 -0
  19. package/lib/engine/cdkpipelines/CdkPipelinesEngine.js +419 -43
  20. package/lib/engine/codepipeline/CodePipelineEngine.d.ts +22 -15
  21. package/lib/engine/codepipeline/CodePipelineEngine.js +681 -127
  22. package/lib/engine/codepipeline/DeploymentPipeline.d.ts +8 -5
  23. package/lib/engine/codepipeline/DeploymentPipeline.js +937 -72
  24. package/lib/engine/external-id-secrets.d.ts +17 -0
  25. package/lib/engine/external-id-secrets.js +53 -0
  26. package/lib/engine/github/GitHubActionsEngine.d.ts +3 -4
  27. package/lib/engine/github/GitHubActionsEngine.js +446 -34
  28. package/lib/index.d.ts +3 -1
  29. package/lib/index.js +6 -2
  30. package/lib/runtime/attach.js +1 -1
  31. package/lib/runtime/inject.d.ts +41 -3
  32. package/lib/runtime/inject.js +259 -22
  33. package/lib/runtime/pipeline-assembler.d.ts +7 -1
  34. package/lib/runtime/pipeline-assembler.js +144 -36
  35. package/lib/runtime/register.js +10 -1
  36. package/lib/support/AccessLogsForBucketAspect.d.ts +14 -8
  37. package/lib/support/AccessLogsForBucketAspect.js +52 -37
  38. package/lib/support/DestroyEncryptionKeysOnDeleteAspect.js +1 -1
  39. package/lib/support/DisablePublicIPAssignmentForEC2Aspect.js +1 -1
  40. package/lib/support/EncryptBucketOnTransitAspect.js +1 -1
  41. package/lib/support/EncryptCloudWatchLogGroupsAspect.js +1 -1
  42. package/lib/support/EncryptSNSTopicOnTransitAspect.js +1 -1
  43. package/lib/support/LambdaDLQAspect.js +1 -1
  44. package/lib/support/LogRetentionAspect.js +1 -1
  45. package/lib/support/RotateEncryptionKeysAspect.js +1 -1
  46. package/lib/support/SupportResources.d.ts +24 -14
  47. package/lib/support/SupportResources.js +42 -24
  48. package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +19 -18
  49. package/node_modules/yaml/browser/dist/nodes/Alias.js +25 -23
  50. package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +19 -18
  51. package/node_modules/yaml/dist/nodes/Alias.js +25 -23
  52. package/node_modules/yaml/package.json +1 -1
  53. package/package.json +6 -5
@@ -3,7 +3,10 @@ import { Construct } from 'constructs';
3
3
  import { EngineRenderProps, IEngine } from '../types';
4
4
  /** Options for the CodePipeline engine. */
5
5
  export interface CodePipelineEngineProps {
6
- /** CodeBuild image for the CI and deploy projects. Defaults to the standard Amazon Linux image. */
6
+ /**
7
+ * CodeBuild image for the CI Build project only. Overrides `config.ci.image`; defaults to the
8
+ * standard Amazon Linux image.
9
+ */
7
10
  readonly buildImage?: string;
8
11
  /**
9
12
  * Removal policy for the pipeline's own support resources (artifact bucket, encryption key).
@@ -26,21 +29,27 @@ export declare class CodePipelineEngine implements IEngine {
26
29
  * keeps CDK's generated name.
27
30
  */
28
31
  private enforceRoleNames;
32
+ /**
33
+ * Let the CI synth project perform context lookups in every target environment it resolves. The
34
+ * synthesizer's lookup role is the least-privilege path for VPC, hosted-zone, AMI and other context
35
+ * providers; the bootstrap version parameter is read by the CLI before it assumes that role.
36
+ */
37
+ private grantLookupPermissions;
38
+ /**
39
+ * Grant the stage synth process access to secret-backed deploy-role ExternalIds. A stage override
40
+ * wins over the pipeline fallback, matching the CLI, and an ExternalId is ignored unless a non-blank
41
+ * deployRole is configured because there is then no role assumption to supply it to.
42
+ */
43
+ private grantExternalIdSecretRead;
29
44
  /**
30
45
  * Let a `cdk deploy` project actually deploy into `account`/`regions` -- a stage's application
31
46
  * deploy, or the self-update stage deploying the pipeline into its own account. `cdk deploy` does
32
- * everything through the CDK bootstrap roles, so the project's own role needs nothing but permission
33
- * to assume them, plus any forced deployer role passed in. Without this the project fails AccessDenied.
47
+ * everything through the CDK bootstrap roles, so the project's own role needs permission to assume
48
+ * them, plus any forced deployment role. A separate CloudFormation execution role is passed to the
49
+ * service by the assumed deployment role; that role, not this project, must have iam:PassRole.
34
50
  *
35
51
  * The bootstrap version parameter is granted for the CLI's base-credentials path only; on the
36
52
  * normal path the CLI reads it under the *assumed* bootstrap role, not under this project's role.
37
- *
38
- * The qualifier is the bootstrap default because that is what the wrapper's synthesizer uses --
39
- * `resolveSynthesizer` builds a plain `DefaultStackSynthesizer` and does not thread the config's
40
- * `qualifier` through, so keying these ARNs off `config.qualifier` would point at roles that do not
41
- * exist. A user who sets the `@aws-cdk/core:bootstrapQualifier` context in their own `cdk.json`
42
- * does move their app's roles, and this grant does NOT follow -- see finding
43
- * `code-review-bootstrap-qualifier-not-single-source-of-truth`.
44
53
  */
45
54
  private grantDeployPermissions;
46
55
  /**
@@ -62,11 +71,9 @@ export declare class CodePipelineEngine implements IEngine {
62
71
  private ciCommands;
63
72
  private project;
64
73
  /**
65
- * Merge v2 `codeBuildEnvSettings` (privileged mode, compute type, environment variables --
66
- * `CodeBuildFactoryProvider` parity) into a project's `environment`, applied uniformly to every
67
- * CodeBuild project like v2 did. The engine's own `buildImage` ctor prop (a Docker-registry image
68
- * string) wins over `codeBuildEnvSettings.buildImage` (a full `IBuildImage`) when both are set -- it
69
- * is the more specific, code-level choice.
74
+ * Merge v2 `codeBuildEnvSettings` into a project's environment. Projects that synthesize or deploy
75
+ * applications default to privileged mode so CDK Docker assets/bundling still work; plumbing-only
76
+ * projects do not. An explicit user setting wins. A project-specific image wins over the shared one.
70
77
  */
71
78
  private buildEnvironment;
72
79
  }