projen-pipelines 0.3.18 → 0.3.20
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.
- package/.jsii +253 -117
- package/API.md +236 -0
- package/README.md +65 -0
- package/lib/assign-approver/base.js +1 -1
- package/lib/assign-approver/github.js +1 -1
- package/lib/awscdk/base.d.ts +34 -0
- package/lib/awscdk/base.js +35 -2
- package/lib/awscdk/bash.js +28 -2
- package/lib/awscdk/github.d.ts +12 -0
- package/lib/awscdk/github.js +53 -14
- package/lib/awscdk/gitlab.d.ts +4 -0
- package/lib/awscdk/gitlab.js +20 -9
- package/lib/drift/base.d.ts +19 -0
- package/lib/drift/base.js +29 -2
- package/lib/drift/bash.js +3 -2
- package/lib/drift/github.js +3 -2
- package/lib/drift/gitlab.js +3 -2
- package/lib/drift/step.js +1 -1
- package/lib/steps/amplify-deploy.step.js +1 -1
- package/lib/steps/artifact-steps.js +2 -2
- package/lib/steps/aws-assume-role.step.js +1 -1
- package/lib/steps/github-summary.step.js +1 -1
- package/lib/steps/package-manager-setup.step.d.ts +2 -0
- package/lib/steps/package-manager-setup.step.js +16 -3
- package/lib/steps/registries.js +3 -3
- package/lib/steps/step.js +4 -4
- package/lib/versioning/computation.js +3 -3
- package/lib/versioning/config.js +2 -2
- package/lib/versioning/outputs.js +5 -5
- package/lib/versioning/setup.js +1 -1
- package/lib/versioning/strategy.js +1 -1
- package/lib/versioning/version-info.js +2 -2
- package/llm.md +64 -0
- package/package.json +1 -1
package/API.md
CHANGED
|
@@ -2630,12 +2630,14 @@ const bashCDKPipelineOptions: BashCDKPipelineOptions = { ... }
|
|
|
2630
2630
|
| <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.pkgNamespace">pkgNamespace</a></code> | <code>string</code> | This field determines the NPM namespace to be used when packaging CDK cloud assemblies. |
|
|
2631
2631
|
| <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.postSynthCommands">postSynthCommands</a></code> | <code>string[]</code> | *No description.* |
|
|
2632
2632
|
| <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.postSynthSteps">postSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
|
|
2633
|
+
| <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.preBuildCommand">preBuildCommand</a></code> | <code>string</code> | A command to run before the build step, executed from the repository root. |
|
|
2633
2634
|
| <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.preInstallCommands">preInstallCommands</a></code> | <code>string[]</code> | *No description.* |
|
|
2634
2635
|
| <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.preInstallSteps">preInstallSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
|
|
2635
2636
|
| <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.preSynthCommands">preSynthCommands</a></code> | <code>string[]</code> | *No description.* |
|
|
2636
2637
|
| <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.preSynthSteps">preSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
|
|
2637
2638
|
| <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.stackPrefix">stackPrefix</a></code> | <code>string</code> | This field is used to define a prefix for the AWS Stack resources created during the pipeline's operation. |
|
|
2638
2639
|
| <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.versioning">versioning</a></code> | <code><a href="#projen-pipelines.VersioningConfig">VersioningConfig</a></code> | Versioning configuration. |
|
|
2640
|
+
| <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.workingDirectory">workingDirectory</a></code> | <code>string</code> | The working directory for the pipeline relative to the repository root. |
|
|
2639
2641
|
|
|
2640
2642
|
---
|
|
2641
2643
|
|
|
@@ -2804,6 +2806,27 @@ public readonly postSynthSteps: PipelineStep[];
|
|
|
2804
2806
|
|
|
2805
2807
|
---
|
|
2806
2808
|
|
|
2809
|
+
##### `preBuildCommand`<sup>Optional</sup> <a name="preBuildCommand" id="projen-pipelines.BashCDKPipelineOptions.property.preBuildCommand"></a>
|
|
2810
|
+
|
|
2811
|
+
```typescript
|
|
2812
|
+
public readonly preBuildCommand: string;
|
|
2813
|
+
```
|
|
2814
|
+
|
|
2815
|
+
- *Type:* string
|
|
2816
|
+
- *Default:* no pre-build command
|
|
2817
|
+
|
|
2818
|
+
A command to run before the build step, executed from the repository root.
|
|
2819
|
+
|
|
2820
|
+
When a workingDirectory is set (monorepo subproject), the command is
|
|
2821
|
+
automatically wrapped to execute from the repository root regardless of
|
|
2822
|
+
the job's working directory setting.
|
|
2823
|
+
|
|
2824
|
+
For pnpm workspaces: `pnpm -r --filter <appname>^... run build`
|
|
2825
|
+
For npm workspaces: `npm run build --workspaces --if-present`
|
|
2826
|
+
For yarn workspaces: `yarn workspaces foreach -Rt run build`
|
|
2827
|
+
|
|
2828
|
+
---
|
|
2829
|
+
|
|
2807
2830
|
##### `preInstallCommands`<sup>Optional</sup> <a name="preInstallCommands" id="projen-pipelines.BashCDKPipelineOptions.property.preInstallCommands"></a>
|
|
2808
2831
|
|
|
2809
2832
|
```typescript
|
|
@@ -2869,6 +2892,24 @@ Versioning configuration.
|
|
|
2869
2892
|
|
|
2870
2893
|
---
|
|
2871
2894
|
|
|
2895
|
+
##### `workingDirectory`<sup>Optional</sup> <a name="workingDirectory" id="projen-pipelines.BashCDKPipelineOptions.property.workingDirectory"></a>
|
|
2896
|
+
|
|
2897
|
+
```typescript
|
|
2898
|
+
public readonly workingDirectory: string;
|
|
2899
|
+
```
|
|
2900
|
+
|
|
2901
|
+
- *Type:* string
|
|
2902
|
+
- *Default:* automatically computed from the project's position in the monorepo (empty string for root projects)
|
|
2903
|
+
|
|
2904
|
+
The working directory for the pipeline relative to the repository root.
|
|
2905
|
+
|
|
2906
|
+
This is automatically computed for subprojects but can be explicitly set.
|
|
2907
|
+
|
|
2908
|
+
When set, CI jobs will run commands in this directory, and artifact paths
|
|
2909
|
+
will be prefixed accordingly.
|
|
2910
|
+
|
|
2911
|
+
---
|
|
2912
|
+
|
|
2872
2913
|
### BashDriftDetectionWorkflowOptions <a name="BashDriftDetectionWorkflowOptions" id="projen-pipelines.BashDriftDetectionWorkflowOptions"></a>
|
|
2873
2914
|
|
|
2874
2915
|
#### Initializer <a name="Initializer" id="projen-pipelines.BashDriftDetectionWorkflowOptions.Initializer"></a>
|
|
@@ -2886,6 +2927,7 @@ const bashDriftDetectionWorkflowOptions: BashDriftDetectionWorkflowOptions = { .
|
|
|
2886
2927
|
| <code><a href="#projen-pipelines.BashDriftDetectionWorkflowOptions.property.stages">stages</a></code> | <code><a href="#projen-pipelines.DriftDetectionStageOptions">DriftDetectionStageOptions</a>[]</code> | Drift detection configurations for different environments. |
|
|
2887
2928
|
| <code><a href="#projen-pipelines.BashDriftDetectionWorkflowOptions.property.name">name</a></code> | <code>string</code> | Name of the workflow. |
|
|
2888
2929
|
| <code><a href="#projen-pipelines.BashDriftDetectionWorkflowOptions.property.pipelineName">pipelineName</a></code> | <code>string</code> | A unique name for this pipeline, used as a prefix for workflow files and artifact names to prevent collisions in monorepos. |
|
|
2930
|
+
| <code><a href="#projen-pipelines.BashDriftDetectionWorkflowOptions.property.preInstallSteps">preInstallSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | Additional steps to execute before installing dependencies. These steps are executed before the package manager setup and install command. |
|
|
2889
2931
|
| <code><a href="#projen-pipelines.BashDriftDetectionWorkflowOptions.property.schedule">schedule</a></code> | <code>string</code> | Cron schedule for drift detection. |
|
|
2890
2932
|
| <code><a href="#projen-pipelines.BashDriftDetectionWorkflowOptions.property.scriptPath">scriptPath</a></code> | <code>string</code> | Path to the output script. |
|
|
2891
2933
|
|
|
@@ -2929,6 +2971,23 @@ A unique name for this pipeline, used as a prefix for workflow files and artifac
|
|
|
2929
2971
|
|
|
2930
2972
|
---
|
|
2931
2973
|
|
|
2974
|
+
##### `preInstallSteps`<sup>Optional</sup> <a name="preInstallSteps" id="projen-pipelines.BashDriftDetectionWorkflowOptions.property.preInstallSteps"></a>
|
|
2975
|
+
|
|
2976
|
+
```typescript
|
|
2977
|
+
public readonly preInstallSteps: PipelineStep[];
|
|
2978
|
+
```
|
|
2979
|
+
|
|
2980
|
+
- *Type:* <a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]
|
|
2981
|
+
- *Default:* no additional pre-install steps
|
|
2982
|
+
|
|
2983
|
+
Additional steps to execute before installing dependencies. These steps are executed before the package manager setup and install command.
|
|
2984
|
+
|
|
2985
|
+
Note: Package manager setup (e.g., PnpmSetupStep for pnpm or CorepackSetupStep
|
|
2986
|
+
for Yarn Berry) is automatically detected from the project and always included.
|
|
2987
|
+
Use this option for any additional pre-install steps you need.
|
|
2988
|
+
|
|
2989
|
+
---
|
|
2990
|
+
|
|
2932
2991
|
##### `schedule`<sup>Optional</sup> <a name="schedule" id="projen-pipelines.BashDriftDetectionWorkflowOptions.property.schedule"></a>
|
|
2933
2992
|
|
|
2934
2993
|
```typescript
|
|
@@ -3090,12 +3149,14 @@ const cDKPipelineOptions: CDKPipelineOptions = { ... }
|
|
|
3090
3149
|
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.pkgNamespace">pkgNamespace</a></code> | <code>string</code> | This field determines the NPM namespace to be used when packaging CDK cloud assemblies. |
|
|
3091
3150
|
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.postSynthCommands">postSynthCommands</a></code> | <code>string[]</code> | *No description.* |
|
|
3092
3151
|
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.postSynthSteps">postSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
|
|
3152
|
+
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.preBuildCommand">preBuildCommand</a></code> | <code>string</code> | A command to run before the build step, executed from the repository root. |
|
|
3093
3153
|
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.preInstallCommands">preInstallCommands</a></code> | <code>string[]</code> | *No description.* |
|
|
3094
3154
|
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.preInstallSteps">preInstallSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
|
|
3095
3155
|
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.preSynthCommands">preSynthCommands</a></code> | <code>string[]</code> | *No description.* |
|
|
3096
3156
|
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.preSynthSteps">preSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
|
|
3097
3157
|
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.stackPrefix">stackPrefix</a></code> | <code>string</code> | This field is used to define a prefix for the AWS Stack resources created during the pipeline's operation. |
|
|
3098
3158
|
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.versioning">versioning</a></code> | <code><a href="#projen-pipelines.VersioningConfig">VersioningConfig</a></code> | Versioning configuration. |
|
|
3159
|
+
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.workingDirectory">workingDirectory</a></code> | <code>string</code> | The working directory for the pipeline relative to the repository root. |
|
|
3099
3160
|
|
|
3100
3161
|
---
|
|
3101
3162
|
|
|
@@ -3264,6 +3325,27 @@ public readonly postSynthSteps: PipelineStep[];
|
|
|
3264
3325
|
|
|
3265
3326
|
---
|
|
3266
3327
|
|
|
3328
|
+
##### `preBuildCommand`<sup>Optional</sup> <a name="preBuildCommand" id="projen-pipelines.CDKPipelineOptions.property.preBuildCommand"></a>
|
|
3329
|
+
|
|
3330
|
+
```typescript
|
|
3331
|
+
public readonly preBuildCommand: string;
|
|
3332
|
+
```
|
|
3333
|
+
|
|
3334
|
+
- *Type:* string
|
|
3335
|
+
- *Default:* no pre-build command
|
|
3336
|
+
|
|
3337
|
+
A command to run before the build step, executed from the repository root.
|
|
3338
|
+
|
|
3339
|
+
When a workingDirectory is set (monorepo subproject), the command is
|
|
3340
|
+
automatically wrapped to execute from the repository root regardless of
|
|
3341
|
+
the job's working directory setting.
|
|
3342
|
+
|
|
3343
|
+
For pnpm workspaces: `pnpm -r --filter <appname>^... run build`
|
|
3344
|
+
For npm workspaces: `npm run build --workspaces --if-present`
|
|
3345
|
+
For yarn workspaces: `yarn workspaces foreach -Rt run build`
|
|
3346
|
+
|
|
3347
|
+
---
|
|
3348
|
+
|
|
3267
3349
|
##### `preInstallCommands`<sup>Optional</sup> <a name="preInstallCommands" id="projen-pipelines.CDKPipelineOptions.property.preInstallCommands"></a>
|
|
3268
3350
|
|
|
3269
3351
|
```typescript
|
|
@@ -3329,6 +3411,24 @@ Versioning configuration.
|
|
|
3329
3411
|
|
|
3330
3412
|
---
|
|
3331
3413
|
|
|
3414
|
+
##### `workingDirectory`<sup>Optional</sup> <a name="workingDirectory" id="projen-pipelines.CDKPipelineOptions.property.workingDirectory"></a>
|
|
3415
|
+
|
|
3416
|
+
```typescript
|
|
3417
|
+
public readonly workingDirectory: string;
|
|
3418
|
+
```
|
|
3419
|
+
|
|
3420
|
+
- *Type:* string
|
|
3421
|
+
- *Default:* automatically computed from the project's position in the monorepo (empty string for root projects)
|
|
3422
|
+
|
|
3423
|
+
The working directory for the pipeline relative to the repository root.
|
|
3424
|
+
|
|
3425
|
+
This is automatically computed for subprojects but can be explicitly set.
|
|
3426
|
+
|
|
3427
|
+
When set, CI jobs will run commands in this directory, and artifact paths
|
|
3428
|
+
will be prefixed accordingly.
|
|
3429
|
+
|
|
3430
|
+
---
|
|
3431
|
+
|
|
3332
3432
|
### CloudFormationOnlyOptions <a name="CloudFormationOnlyOptions" id="projen-pipelines.CloudFormationOnlyOptions"></a>
|
|
3333
3433
|
|
|
3334
3434
|
#### Initializer <a name="Initializer" id="projen-pipelines.CloudFormationOnlyOptions.Initializer"></a>
|
|
@@ -4160,6 +4260,7 @@ const driftDetectionWorkflowOptions: DriftDetectionWorkflowOptions = { ... }
|
|
|
4160
4260
|
| <code><a href="#projen-pipelines.DriftDetectionWorkflowOptions.property.stages">stages</a></code> | <code><a href="#projen-pipelines.DriftDetectionStageOptions">DriftDetectionStageOptions</a>[]</code> | Drift detection configurations for different environments. |
|
|
4161
4261
|
| <code><a href="#projen-pipelines.DriftDetectionWorkflowOptions.property.name">name</a></code> | <code>string</code> | Name of the workflow. |
|
|
4162
4262
|
| <code><a href="#projen-pipelines.DriftDetectionWorkflowOptions.property.pipelineName">pipelineName</a></code> | <code>string</code> | A unique name for this pipeline, used as a prefix for workflow files and artifact names to prevent collisions in monorepos. |
|
|
4263
|
+
| <code><a href="#projen-pipelines.DriftDetectionWorkflowOptions.property.preInstallSteps">preInstallSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | Additional steps to execute before installing dependencies. These steps are executed before the package manager setup and install command. |
|
|
4163
4264
|
| <code><a href="#projen-pipelines.DriftDetectionWorkflowOptions.property.schedule">schedule</a></code> | <code>string</code> | Cron schedule for drift detection. |
|
|
4164
4265
|
|
|
4165
4266
|
---
|
|
@@ -4202,6 +4303,23 @@ A unique name for this pipeline, used as a prefix for workflow files and artifac
|
|
|
4202
4303
|
|
|
4203
4304
|
---
|
|
4204
4305
|
|
|
4306
|
+
##### `preInstallSteps`<sup>Optional</sup> <a name="preInstallSteps" id="projen-pipelines.DriftDetectionWorkflowOptions.property.preInstallSteps"></a>
|
|
4307
|
+
|
|
4308
|
+
```typescript
|
|
4309
|
+
public readonly preInstallSteps: PipelineStep[];
|
|
4310
|
+
```
|
|
4311
|
+
|
|
4312
|
+
- *Type:* <a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]
|
|
4313
|
+
- *Default:* no additional pre-install steps
|
|
4314
|
+
|
|
4315
|
+
Additional steps to execute before installing dependencies. These steps are executed before the package manager setup and install command.
|
|
4316
|
+
|
|
4317
|
+
Note: Package manager setup (e.g., PnpmSetupStep for pnpm or CorepackSetupStep
|
|
4318
|
+
for Yarn Berry) is automatically detected from the project and always included.
|
|
4319
|
+
Use this option for any additional pre-install steps you need.
|
|
4320
|
+
|
|
4321
|
+
---
|
|
4322
|
+
|
|
4205
4323
|
##### `schedule`<sup>Optional</sup> <a name="schedule" id="projen-pipelines.DriftDetectionWorkflowOptions.property.schedule"></a>
|
|
4206
4324
|
|
|
4207
4325
|
```typescript
|
|
@@ -4411,12 +4529,14 @@ const githubCDKPipelineOptions: GithubCDKPipelineOptions = { ... }
|
|
|
4411
4529
|
| <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.pkgNamespace">pkgNamespace</a></code> | <code>string</code> | This field determines the NPM namespace to be used when packaging CDK cloud assemblies. |
|
|
4412
4530
|
| <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.postSynthCommands">postSynthCommands</a></code> | <code>string[]</code> | *No description.* |
|
|
4413
4531
|
| <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.postSynthSteps">postSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
|
|
4532
|
+
| <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.preBuildCommand">preBuildCommand</a></code> | <code>string</code> | A command to run before the build step, executed from the repository root. |
|
|
4414
4533
|
| <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.preInstallCommands">preInstallCommands</a></code> | <code>string[]</code> | *No description.* |
|
|
4415
4534
|
| <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.preInstallSteps">preInstallSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
|
|
4416
4535
|
| <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.preSynthCommands">preSynthCommands</a></code> | <code>string[]</code> | *No description.* |
|
|
4417
4536
|
| <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.preSynthSteps">preSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
|
|
4418
4537
|
| <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.stackPrefix">stackPrefix</a></code> | <code>string</code> | This field is used to define a prefix for the AWS Stack resources created during the pipeline's operation. |
|
|
4419
4538
|
| <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.versioning">versioning</a></code> | <code><a href="#projen-pipelines.VersioningConfig">VersioningConfig</a></code> | Versioning configuration. |
|
|
4539
|
+
| <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.workingDirectory">workingDirectory</a></code> | <code>string</code> | The working directory for the pipeline relative to the repository root. |
|
|
4420
4540
|
| <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.runnerTags">runnerTags</a></code> | <code>string[]</code> | runner tags to use to select runners. |
|
|
4421
4541
|
| <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.useGithubEnvironments">useGithubEnvironments</a></code> | <code>boolean</code> | whether to use GitHub environments for deployment stages. |
|
|
4422
4542
|
| <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.useGithubEnvironmentsForAssetUpload">useGithubEnvironmentsForAssetUpload</a></code> | <code>boolean</code> | whether to use GitHub environments for asset upload step Create separate, parallel jobs for asset upload since GitHub Environments require unique environment names per job. |
|
|
@@ -4589,6 +4709,27 @@ public readonly postSynthSteps: PipelineStep[];
|
|
|
4589
4709
|
|
|
4590
4710
|
---
|
|
4591
4711
|
|
|
4712
|
+
##### `preBuildCommand`<sup>Optional</sup> <a name="preBuildCommand" id="projen-pipelines.GithubCDKPipelineOptions.property.preBuildCommand"></a>
|
|
4713
|
+
|
|
4714
|
+
```typescript
|
|
4715
|
+
public readonly preBuildCommand: string;
|
|
4716
|
+
```
|
|
4717
|
+
|
|
4718
|
+
- *Type:* string
|
|
4719
|
+
- *Default:* no pre-build command
|
|
4720
|
+
|
|
4721
|
+
A command to run before the build step, executed from the repository root.
|
|
4722
|
+
|
|
4723
|
+
When a workingDirectory is set (monorepo subproject), the command is
|
|
4724
|
+
automatically wrapped to execute from the repository root regardless of
|
|
4725
|
+
the job's working directory setting.
|
|
4726
|
+
|
|
4727
|
+
For pnpm workspaces: `pnpm -r --filter <appname>^... run build`
|
|
4728
|
+
For npm workspaces: `npm run build --workspaces --if-present`
|
|
4729
|
+
For yarn workspaces: `yarn workspaces foreach -Rt run build`
|
|
4730
|
+
|
|
4731
|
+
---
|
|
4732
|
+
|
|
4592
4733
|
##### `preInstallCommands`<sup>Optional</sup> <a name="preInstallCommands" id="projen-pipelines.GithubCDKPipelineOptions.property.preInstallCommands"></a>
|
|
4593
4734
|
|
|
4594
4735
|
```typescript
|
|
@@ -4654,6 +4795,24 @@ Versioning configuration.
|
|
|
4654
4795
|
|
|
4655
4796
|
---
|
|
4656
4797
|
|
|
4798
|
+
##### `workingDirectory`<sup>Optional</sup> <a name="workingDirectory" id="projen-pipelines.GithubCDKPipelineOptions.property.workingDirectory"></a>
|
|
4799
|
+
|
|
4800
|
+
```typescript
|
|
4801
|
+
public readonly workingDirectory: string;
|
|
4802
|
+
```
|
|
4803
|
+
|
|
4804
|
+
- *Type:* string
|
|
4805
|
+
- *Default:* automatically computed from the project's position in the monorepo (empty string for root projects)
|
|
4806
|
+
|
|
4807
|
+
The working directory for the pipeline relative to the repository root.
|
|
4808
|
+
|
|
4809
|
+
This is automatically computed for subprojects but can be explicitly set.
|
|
4810
|
+
|
|
4811
|
+
When set, CI jobs will run commands in this directory, and artifact paths
|
|
4812
|
+
will be prefixed accordingly.
|
|
4813
|
+
|
|
4814
|
+
---
|
|
4815
|
+
|
|
4657
4816
|
##### `runnerTags`<sup>Optional</sup> <a name="runnerTags" id="projen-pipelines.GithubCDKPipelineOptions.property.runnerTags"></a>
|
|
4658
4817
|
|
|
4659
4818
|
```typescript
|
|
@@ -4729,6 +4888,7 @@ const gitHubDriftDetectionWorkflowOptions: GitHubDriftDetectionWorkflowOptions =
|
|
|
4729
4888
|
| <code><a href="#projen-pipelines.GitHubDriftDetectionWorkflowOptions.property.stages">stages</a></code> | <code><a href="#projen-pipelines.DriftDetectionStageOptions">DriftDetectionStageOptions</a>[]</code> | Drift detection configurations for different environments. |
|
|
4730
4889
|
| <code><a href="#projen-pipelines.GitHubDriftDetectionWorkflowOptions.property.name">name</a></code> | <code>string</code> | Name of the workflow. |
|
|
4731
4890
|
| <code><a href="#projen-pipelines.GitHubDriftDetectionWorkflowOptions.property.pipelineName">pipelineName</a></code> | <code>string</code> | A unique name for this pipeline, used as a prefix for workflow files and artifact names to prevent collisions in monorepos. |
|
|
4891
|
+
| <code><a href="#projen-pipelines.GitHubDriftDetectionWorkflowOptions.property.preInstallSteps">preInstallSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | Additional steps to execute before installing dependencies. These steps are executed before the package manager setup and install command. |
|
|
4732
4892
|
| <code><a href="#projen-pipelines.GitHubDriftDetectionWorkflowOptions.property.schedule">schedule</a></code> | <code>string</code> | Cron schedule for drift detection. |
|
|
4733
4893
|
| <code><a href="#projen-pipelines.GitHubDriftDetectionWorkflowOptions.property.createIssues">createIssues</a></code> | <code>boolean</code> | Whether to create issues on drift detection. |
|
|
4734
4894
|
| <code><a href="#projen-pipelines.GitHubDriftDetectionWorkflowOptions.property.permissions">permissions</a></code> | <code>{[ key: string ]: string}</code> | Additional permissions for GitHub workflow. |
|
|
@@ -4773,6 +4933,23 @@ A unique name for this pipeline, used as a prefix for workflow files and artifac
|
|
|
4773
4933
|
|
|
4774
4934
|
---
|
|
4775
4935
|
|
|
4936
|
+
##### `preInstallSteps`<sup>Optional</sup> <a name="preInstallSteps" id="projen-pipelines.GitHubDriftDetectionWorkflowOptions.property.preInstallSteps"></a>
|
|
4937
|
+
|
|
4938
|
+
```typescript
|
|
4939
|
+
public readonly preInstallSteps: PipelineStep[];
|
|
4940
|
+
```
|
|
4941
|
+
|
|
4942
|
+
- *Type:* <a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]
|
|
4943
|
+
- *Default:* no additional pre-install steps
|
|
4944
|
+
|
|
4945
|
+
Additional steps to execute before installing dependencies. These steps are executed before the package manager setup and install command.
|
|
4946
|
+
|
|
4947
|
+
Note: Package manager setup (e.g., PnpmSetupStep for pnpm or CorepackSetupStep
|
|
4948
|
+
for Yarn Berry) is automatically detected from the project and always included.
|
|
4949
|
+
Use this option for any additional pre-install steps you need.
|
|
4950
|
+
|
|
4951
|
+
---
|
|
4952
|
+
|
|
4776
4953
|
##### `schedule`<sup>Optional</sup> <a name="schedule" id="projen-pipelines.GitHubDriftDetectionWorkflowOptions.property.schedule"></a>
|
|
4777
4954
|
|
|
4778
4955
|
```typescript
|
|
@@ -5109,12 +5286,14 @@ const gitlabCDKPipelineOptions: GitlabCDKPipelineOptions = { ... }
|
|
|
5109
5286
|
| <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.pkgNamespace">pkgNamespace</a></code> | <code>string</code> | This field determines the NPM namespace to be used when packaging CDK cloud assemblies. |
|
|
5110
5287
|
| <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.postSynthCommands">postSynthCommands</a></code> | <code>string[]</code> | *No description.* |
|
|
5111
5288
|
| <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.postSynthSteps">postSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
|
|
5289
|
+
| <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.preBuildCommand">preBuildCommand</a></code> | <code>string</code> | A command to run before the build step, executed from the repository root. |
|
|
5112
5290
|
| <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.preInstallCommands">preInstallCommands</a></code> | <code>string[]</code> | *No description.* |
|
|
5113
5291
|
| <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.preInstallSteps">preInstallSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
|
|
5114
5292
|
| <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.preSynthCommands">preSynthCommands</a></code> | <code>string[]</code> | *No description.* |
|
|
5115
5293
|
| <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.preSynthSteps">preSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
|
|
5116
5294
|
| <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.stackPrefix">stackPrefix</a></code> | <code>string</code> | This field is used to define a prefix for the AWS Stack resources created during the pipeline's operation. |
|
|
5117
5295
|
| <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.versioning">versioning</a></code> | <code><a href="#projen-pipelines.VersioningConfig">VersioningConfig</a></code> | Versioning configuration. |
|
|
5296
|
+
| <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.workingDirectory">workingDirectory</a></code> | <code>string</code> | The working directory for the pipeline relative to the repository root. |
|
|
5118
5297
|
| <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.image">image</a></code> | <code>string</code> | The Docker image to use for running the pipeline jobs. |
|
|
5119
5298
|
| <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.runnerTags">runnerTags</a></code> | <code><a href="#projen-pipelines.GitlabRunnerTags">GitlabRunnerTags</a></code> | Runner tags configuration for the pipeline. |
|
|
5120
5299
|
|
|
@@ -5285,6 +5464,27 @@ public readonly postSynthSteps: PipelineStep[];
|
|
|
5285
5464
|
|
|
5286
5465
|
---
|
|
5287
5466
|
|
|
5467
|
+
##### `preBuildCommand`<sup>Optional</sup> <a name="preBuildCommand" id="projen-pipelines.GitlabCDKPipelineOptions.property.preBuildCommand"></a>
|
|
5468
|
+
|
|
5469
|
+
```typescript
|
|
5470
|
+
public readonly preBuildCommand: string;
|
|
5471
|
+
```
|
|
5472
|
+
|
|
5473
|
+
- *Type:* string
|
|
5474
|
+
- *Default:* no pre-build command
|
|
5475
|
+
|
|
5476
|
+
A command to run before the build step, executed from the repository root.
|
|
5477
|
+
|
|
5478
|
+
When a workingDirectory is set (monorepo subproject), the command is
|
|
5479
|
+
automatically wrapped to execute from the repository root regardless of
|
|
5480
|
+
the job's working directory setting.
|
|
5481
|
+
|
|
5482
|
+
For pnpm workspaces: `pnpm -r --filter <appname>^... run build`
|
|
5483
|
+
For npm workspaces: `npm run build --workspaces --if-present`
|
|
5484
|
+
For yarn workspaces: `yarn workspaces foreach -Rt run build`
|
|
5485
|
+
|
|
5486
|
+
---
|
|
5487
|
+
|
|
5288
5488
|
##### `preInstallCommands`<sup>Optional</sup> <a name="preInstallCommands" id="projen-pipelines.GitlabCDKPipelineOptions.property.preInstallCommands"></a>
|
|
5289
5489
|
|
|
5290
5490
|
```typescript
|
|
@@ -5350,6 +5550,24 @@ Versioning configuration.
|
|
|
5350
5550
|
|
|
5351
5551
|
---
|
|
5352
5552
|
|
|
5553
|
+
##### `workingDirectory`<sup>Optional</sup> <a name="workingDirectory" id="projen-pipelines.GitlabCDKPipelineOptions.property.workingDirectory"></a>
|
|
5554
|
+
|
|
5555
|
+
```typescript
|
|
5556
|
+
public readonly workingDirectory: string;
|
|
5557
|
+
```
|
|
5558
|
+
|
|
5559
|
+
- *Type:* string
|
|
5560
|
+
- *Default:* automatically computed from the project's position in the monorepo (empty string for root projects)
|
|
5561
|
+
|
|
5562
|
+
The working directory for the pipeline relative to the repository root.
|
|
5563
|
+
|
|
5564
|
+
This is automatically computed for subprojects but can be explicitly set.
|
|
5565
|
+
|
|
5566
|
+
When set, CI jobs will run commands in this directory, and artifact paths
|
|
5567
|
+
will be prefixed accordingly.
|
|
5568
|
+
|
|
5569
|
+
---
|
|
5570
|
+
|
|
5353
5571
|
##### `image`<sup>Optional</sup> <a name="image" id="projen-pipelines.GitlabCDKPipelineOptions.property.image"></a>
|
|
5354
5572
|
|
|
5355
5573
|
```typescript
|
|
@@ -5391,6 +5609,7 @@ const gitLabDriftDetectionWorkflowOptions: GitLabDriftDetectionWorkflowOptions =
|
|
|
5391
5609
|
| <code><a href="#projen-pipelines.GitLabDriftDetectionWorkflowOptions.property.stages">stages</a></code> | <code><a href="#projen-pipelines.DriftDetectionStageOptions">DriftDetectionStageOptions</a>[]</code> | Drift detection configurations for different environments. |
|
|
5392
5610
|
| <code><a href="#projen-pipelines.GitLabDriftDetectionWorkflowOptions.property.name">name</a></code> | <code>string</code> | Name of the workflow. |
|
|
5393
5611
|
| <code><a href="#projen-pipelines.GitLabDriftDetectionWorkflowOptions.property.pipelineName">pipelineName</a></code> | <code>string</code> | A unique name for this pipeline, used as a prefix for workflow files and artifact names to prevent collisions in monorepos. |
|
|
5612
|
+
| <code><a href="#projen-pipelines.GitLabDriftDetectionWorkflowOptions.property.preInstallSteps">preInstallSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | Additional steps to execute before installing dependencies. These steps are executed before the package manager setup and install command. |
|
|
5394
5613
|
| <code><a href="#projen-pipelines.GitLabDriftDetectionWorkflowOptions.property.schedule">schedule</a></code> | <code>string</code> | Cron schedule for drift detection. |
|
|
5395
5614
|
| <code><a href="#projen-pipelines.GitLabDriftDetectionWorkflowOptions.property.image">image</a></code> | <code>string</code> | Docker image to use for drift detection. |
|
|
5396
5615
|
| <code><a href="#projen-pipelines.GitLabDriftDetectionWorkflowOptions.property.runnerTags">runnerTags</a></code> | <code>string[]</code> | GitLab runner tags. |
|
|
@@ -5435,6 +5654,23 @@ A unique name for this pipeline, used as a prefix for workflow files and artifac
|
|
|
5435
5654
|
|
|
5436
5655
|
---
|
|
5437
5656
|
|
|
5657
|
+
##### `preInstallSteps`<sup>Optional</sup> <a name="preInstallSteps" id="projen-pipelines.GitLabDriftDetectionWorkflowOptions.property.preInstallSteps"></a>
|
|
5658
|
+
|
|
5659
|
+
```typescript
|
|
5660
|
+
public readonly preInstallSteps: PipelineStep[];
|
|
5661
|
+
```
|
|
5662
|
+
|
|
5663
|
+
- *Type:* <a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]
|
|
5664
|
+
- *Default:* no additional pre-install steps
|
|
5665
|
+
|
|
5666
|
+
Additional steps to execute before installing dependencies. These steps are executed before the package manager setup and install command.
|
|
5667
|
+
|
|
5668
|
+
Note: Package manager setup (e.g., PnpmSetupStep for pnpm or CorepackSetupStep
|
|
5669
|
+
for Yarn Berry) is automatically detected from the project and always included.
|
|
5670
|
+
Use this option for any additional pre-install steps you need.
|
|
5671
|
+
|
|
5672
|
+
---
|
|
5673
|
+
|
|
5438
5674
|
##### `schedule`<sup>Optional</sup> <a name="schedule" id="projen-pipelines.GitLabDriftDetectionWorkflowOptions.property.schedule"></a>
|
|
5439
5675
|
|
|
5440
5676
|
```typescript
|
package/README.md
CHANGED
|
@@ -524,6 +524,71 @@ When `paths` is specified:
|
|
|
524
524
|
|
|
525
525
|
This allows you to have multiple pipelines in the same repository, each responsible for a different subproject, without triggering unnecessary deployments.
|
|
526
526
|
|
|
527
|
+
### Monorepo Subproject Pipelines
|
|
528
|
+
|
|
529
|
+
For monorepos using projen subprojects, you can attach a pipeline directly to a subproject. The library automatically detects that the project is a subproject and configures CI to run commands in the correct subdirectory.
|
|
530
|
+
|
|
531
|
+
```typescript
|
|
532
|
+
import { awscdk } from 'projen';
|
|
533
|
+
import { GithubCDKPipeline } from 'projen-pipelines';
|
|
534
|
+
|
|
535
|
+
// Root monorepo project
|
|
536
|
+
const root = new awscdk.AwsCdkTypeScriptApp({
|
|
537
|
+
cdkVersion: '2.150.0',
|
|
538
|
+
name: 'my-monorepo',
|
|
539
|
+
defaultReleaseBranch: 'main',
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
// Subproject at packages/backend
|
|
543
|
+
const backend = new awscdk.AwsCdkTypeScriptApp({
|
|
544
|
+
cdkVersion: '2.150.0',
|
|
545
|
+
name: 'backend',
|
|
546
|
+
defaultReleaseBranch: 'main',
|
|
547
|
+
parent: root,
|
|
548
|
+
outdir: 'packages/backend',
|
|
549
|
+
devDeps: ['projen-pipelines'],
|
|
550
|
+
});
|
|
551
|
+
|
|
552
|
+
// Pipeline for the subproject - automatically sets working directory
|
|
553
|
+
new GithubCDKPipeline(backend, {
|
|
554
|
+
iamRoleArns: {
|
|
555
|
+
default: 'arn:aws:iam::123456789012:role/DeployRole',
|
|
556
|
+
},
|
|
557
|
+
// Optional: build workspace dependencies first
|
|
558
|
+
preBuildCommand: 'pnpm -r --filter backend^... run build',
|
|
559
|
+
stages: [
|
|
560
|
+
{ name: 'dev', env: { account: '123456789012', region: 'eu-central-1' } },
|
|
561
|
+
{ name: 'prod', env: { account: '123456789013', region: 'eu-central-1' } },
|
|
562
|
+
],
|
|
563
|
+
});
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
When the pipeline is attached to a subproject:
|
|
567
|
+
- **GitHub Actions**: Every job gets `defaults.run.working-directory: packages/backend`, and artifact paths are prefixed with `packages/backend/`. Workflows are placed in the root `.github/workflows/` directory (since GitHub only discovers workflows there).
|
|
568
|
+
- **GitLab CI**: Job scripts are prefixed with `cd packages/backend`, and artifact paths are adjusted.
|
|
569
|
+
- **Bash**: The pipeline.md instructions include `cd packages/backend` before each command block.
|
|
570
|
+
|
|
571
|
+
#### preBuildCommand
|
|
572
|
+
|
|
573
|
+
In monorepos, workspace sibling packages may need to be built before the app can compile. Use `preBuildCommand` to inject a build step that runs from the repository root before the synth/build:
|
|
574
|
+
|
|
575
|
+
| Package Manager | preBuildCommand |
|
|
576
|
+
|-----------------|-----------------|
|
|
577
|
+
| pnpm | `pnpm -r --filter <appname>^... run build` |
|
|
578
|
+
| npm | `npm run build --workspaces --if-present` |
|
|
579
|
+
| yarn | `yarn workspaces foreach -Rt run build` |
|
|
580
|
+
|
|
581
|
+
#### workingDirectory
|
|
582
|
+
|
|
583
|
+
The working directory is automatically computed from the project hierarchy. You can also set it explicitly via the `workingDirectory` option if needed (for example, when the pipeline project is not a projen subproject):
|
|
584
|
+
|
|
585
|
+
```typescript
|
|
586
|
+
new GithubCDKPipeline(app, {
|
|
587
|
+
workingDirectory: 'packages/backend',
|
|
588
|
+
// ...
|
|
589
|
+
});
|
|
590
|
+
```
|
|
591
|
+
|
|
527
592
|
### AWS Amplify Deployment
|
|
528
593
|
|
|
529
594
|
Projen Pipelines includes support for deploying static websites and single-page applications to AWS Amplify Hosting. This feature provides automated deployment of build artifacts to Amplify, with built-in support for multiple environments and branch-based deployments.
|
|
@@ -12,5 +12,5 @@ class AssignApprover extends projen_1.Component {
|
|
|
12
12
|
}
|
|
13
13
|
exports.AssignApprover = AssignApprover;
|
|
14
14
|
_a = JSII_RTTI_SYMBOL_1;
|
|
15
|
-
AssignApprover[_a] = { fqn: "projen-pipelines.AssignApprover", version: "0.3.
|
|
15
|
+
AssignApprover[_a] = { fqn: "projen-pipelines.AssignApprover", version: "0.3.20" };
|
|
16
16
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hc3NpZ24tYXBwcm92ZXIvYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLG1DQUE0QztBQXVCNUMsTUFBc0IsY0FBZSxTQUFRLGtCQUFTO0lBR3BELFlBQVksS0FBYyxFQUFxQixXQUFrQztRQUMvRSxLQUFLLENBQUMsS0FBSyxDQUFDLENBQUM7UUFEZ0MsZ0JBQVcsR0FBWCxXQUFXLENBQXVCO0lBRWpGLENBQUM7O0FBTEgsd0NBT0MiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21wb25lbnQsIFByb2plY3QgfSBmcm9tICdwcm9qZW4nO1xuXG5leHBvcnQgaW50ZXJmYWNlIEFwcHJvdmVyTWFwcGluZyB7XG5cbiAgcmVhZG9ubHkgYXV0aG9yOiBzdHJpbmc7XG4gIHJlYWRvbmx5IGFwcHJvdmVyczogc3RyaW5nW107XG5cbn1cblxuZXhwb3J0IGludGVyZmFjZSBBc3NpZ25BcHByb3Zlck9wdGlvbnMge1xuXG4gIC8qKlxuICAgKiBUaGUgbWFwcGluZyBvZiBhdXRob3JzIHRvIGFwcHJvdmVycy5cbiAgICovXG4gIHJlYWRvbmx5IGFwcHJvdmVyTWFwcGluZzogQXBwcm92ZXJNYXBwaW5nW107XG5cbiAgLyoqXG4gICAqIFRoZSBHaXRIdWIgdG9rZW4gdG8gdXNlIGZvciB0aGUgQVBJIGNhbGxzLlxuICAgKi9cbiAgcmVhZG9ubHkgZGVmYXVsdEFwcHJvdmVyczogc3RyaW5nW107XG5cbn1cblxuZXhwb3J0IGFic3RyYWN0IGNsYXNzIEFzc2lnbkFwcHJvdmVyIGV4dGVuZHMgQ29tcG9uZW50IHtcblxuXG4gIGNvbnN0cnVjdG9yKHNjb3BlOiBQcm9qZWN0LCBwcm90ZWN0ZWQgcmVhZG9ubHkgYmFzZU9wdGlvbnM6IEFzc2lnbkFwcHJvdmVyT3B0aW9ucykge1xuICAgIHN1cGVyKHNjb3BlKTtcbiAgfVxuXG59Il19
|
|
@@ -81,5 +81,5 @@ if (filteredApprovers.length > 0) {
|
|
|
81
81
|
}
|
|
82
82
|
exports.GitHubAssignApprover = GitHubAssignApprover;
|
|
83
83
|
_a = JSII_RTTI_SYMBOL_1;
|
|
84
|
-
GitHubAssignApprover[_a] = { fqn: "projen-pipelines.GitHubAssignApprover", version: "0.3.
|
|
84
|
+
GitHubAssignApprover[_a] = { fqn: "projen-pipelines.GitHubAssignApprover", version: "0.3.20" };
|
|
85
85
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2l0aHViLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Fzc2lnbi1hcHByb3Zlci9naXRodWIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFDQSx1RUFBa0Y7QUFDbEYsaUNBQStEO0FBYS9ELE1BQWEsb0JBQXFCLFNBQVEscUJBQWM7SUFJdEQsWUFBWSxLQUFvQixFQUFFLE9BQW9DO1FBQ3BFLEtBQUssQ0FBQyxLQUFLLEVBQUUsT0FBTyxDQUFDLENBQUM7UUFDdEIsSUFBSSxDQUFDLE9BQU8sR0FBRyxPQUFPLENBQUM7UUFFdkIsZ0R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Gh1Yi5yZXN0LnB1bGxzLnJlcXVlc3RSZXZpZXdlcnMoe1xuICAgIG93bmVyOiBjb250ZXh0LnJlcG8ub3duZXIsXG4gICAgcmVwbzogY29udGV4dC5yZXBvLnJlcG8sXG4gICAgcHVsbF9udW1iZXI6IGNvbnRleHQuaXNzdWUubnVtYmVyLFxuICAgIHJldmlld2VyczogZmlsdGVyZWRBcHByb3ZlcnNcbiAgfSk7XG4gIFxuICBjb25zb2xlLmxvZyhcXGBBc3NpZ25lZCByZXZpZXdlcnM6IFxcJHtmaWx0ZXJlZEFwcHJvdmVycy5qb2luKCcsICcpfVxcYCk7XG59IGVsc2Uge1xuICBjb25zb2xlLmxvZygnTm8gZWxpZ2libGUgcmV2aWV3ZXJzIGZvdW5kIGZvciB0aGlzIFBSIGF1dGhvcicpO1xufWA7XG4gIH1cbn1cbiJdfQ==
|
package/lib/awscdk/base.d.ts
CHANGED
|
@@ -172,6 +172,29 @@ export interface CDKPipelineOptions {
|
|
|
172
172
|
readonly preInstallSteps?: PipelineStep[];
|
|
173
173
|
readonly preSynthSteps?: PipelineStep[];
|
|
174
174
|
readonly postSynthSteps?: PipelineStep[];
|
|
175
|
+
/**
|
|
176
|
+
* The working directory for the pipeline relative to the repository root.
|
|
177
|
+
* This is automatically computed for subprojects but can be explicitly set.
|
|
178
|
+
*
|
|
179
|
+
* When set, CI jobs will run commands in this directory, and artifact paths
|
|
180
|
+
* will be prefixed accordingly.
|
|
181
|
+
*
|
|
182
|
+
* @default - automatically computed from the project's position in the monorepo (empty string for root projects)
|
|
183
|
+
*/
|
|
184
|
+
readonly workingDirectory?: string;
|
|
185
|
+
/**
|
|
186
|
+
* A command to run before the build step, executed from the repository root.
|
|
187
|
+
* When a workingDirectory is set (monorepo subproject), the command is
|
|
188
|
+
* automatically wrapped to execute from the repository root regardless of
|
|
189
|
+
* the job's working directory setting.
|
|
190
|
+
*
|
|
191
|
+
* For pnpm workspaces: `pnpm -r --filter <appname>^... run build`
|
|
192
|
+
* For npm workspaces: `npm run build --workspaces --if-present`
|
|
193
|
+
* For yarn workspaces: `yarn workspaces foreach -Rt run build`
|
|
194
|
+
*
|
|
195
|
+
* @default - no pre-build command
|
|
196
|
+
*/
|
|
197
|
+
readonly preBuildCommand?: string;
|
|
175
198
|
/**
|
|
176
199
|
* Versioning configuration
|
|
177
200
|
*/
|
|
@@ -188,10 +211,21 @@ export declare abstract class CDKPipeline extends Component {
|
|
|
188
211
|
readonly branchName: string;
|
|
189
212
|
/** Prefix for workflow files, concurrency groups, and artifact names to prevent collisions in monorepos. */
|
|
190
213
|
protected readonly namePrefix: string;
|
|
214
|
+
/**
|
|
215
|
+
* The working directory relative to the repository root for this pipeline.
|
|
216
|
+
* Undefined when the pipeline is at the repository root.
|
|
217
|
+
*/
|
|
218
|
+
protected readonly workingDirectory: string | undefined;
|
|
191
219
|
constructor(app: awscdk.AwsCdkTypeScriptApp, baseOptions: CDKPipelineOptions);
|
|
192
220
|
abstract engineType(): PipelineEngine;
|
|
193
221
|
protected provideInstallStep(): PipelineStep;
|
|
194
222
|
protected provideSynthStep(): PipelineStep;
|
|
223
|
+
/**
|
|
224
|
+
* Returns the preBuildCommand wrapped to execute from the repository root.
|
|
225
|
+
* When workingDirectory is set, the command is prefixed with a cd to the
|
|
226
|
+
* repo root using engine-appropriate environment variables.
|
|
227
|
+
*/
|
|
228
|
+
private preBuildCommandWrapped;
|
|
195
229
|
protected provideAssetUploadStep(stageName?: string): PipelineStep;
|
|
196
230
|
protected provideAssemblyUploadStep(): PipelineStep;
|
|
197
231
|
protected provideDeployStep(stage: NamedStageOptions): PipelineStep;
|