projen-pipelines 0.0.2 → 0.0.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.
- package/.jsii +767 -17
- package/API.md +550 -2
- package/README.md +1 -1
- package/lib/engine/base.d.ts +22 -0
- package/lib/engine/base.js +16 -0
- package/lib/engine/github.d.ts +22 -0
- package/lib/engine/github.js +117 -0
- package/lib/engine/index.d.ts +2 -0
- package/lib/engine/index.js +19 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -1
- package/lib/pipeline.d.ts +45 -1
- package/lib/pipeline.js +80 -25
- package/package.json +1 -1
package/API.md
CHANGED
|
@@ -13,7 +13,7 @@ With this library, you can handle complex deployment scenarios with less code an
|
|
|
13
13
|
|
|
14
14
|
### Installation
|
|
15
15
|
|
|
16
|
-
To install the package, add
|
|
16
|
+
To install the package, add the package `projen-pipelines` to your projects devDeps in your projen configuration file.
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
After installing the package, you can import and use the constructs to define your CDK Pipelines.
|
|
@@ -158,6 +158,34 @@ Your pull request will be reviewed and hopefully merged quickly. Thanks for cont
|
|
|
158
158
|
|
|
159
159
|
## Structs <a name="Structs" id="Structs"></a>
|
|
160
160
|
|
|
161
|
+
### AssetUploadStageOptions <a name="AssetUploadStageOptions" id="projen-pipelines.AssetUploadStageOptions"></a>
|
|
162
|
+
|
|
163
|
+
#### Initializer <a name="Initializer" id="projen-pipelines.AssetUploadStageOptions.Initializer"></a>
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
import { AssetUploadStageOptions } from 'projen-pipelines'
|
|
167
|
+
|
|
168
|
+
const assetUploadStageOptions: AssetUploadStageOptions = { ... }
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
172
|
+
|
|
173
|
+
| **Name** | **Type** | **Description** |
|
|
174
|
+
| --- | --- | --- |
|
|
175
|
+
| <code><a href="#projen-pipelines.AssetUploadStageOptions.property.commands">commands</a></code> | <code>string[]</code> | *No description.* |
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
##### `commands`<sup>Required</sup> <a name="commands" id="projen-pipelines.AssetUploadStageOptions.property.commands"></a>
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
public readonly commands: string[];
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
- *Type:* string[]
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
161
189
|
### CDKPipelineOptions <a name="CDKPipelineOptions" id="projen-pipelines.CDKPipelineOptions"></a>
|
|
162
190
|
|
|
163
191
|
The CDKPipelineOptions interface is designed to provide configuration options for a CDK (Cloud Development Kit) pipeline.
|
|
@@ -180,6 +208,12 @@ const cDKPipelineOptions: CDKPipelineOptions = { ... }
|
|
|
180
208
|
| --- | --- | --- |
|
|
181
209
|
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.environments">environments</a></code> | <code><a href="#projen-pipelines.EnvironmentMap">EnvironmentMap</a></code> | This is a map of environments to be used in the pipeline. |
|
|
182
210
|
| <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. |
|
|
211
|
+
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.deploymentType">deploymentType</a></code> | <code><a href="#projen-pipelines.DeploymentType">DeploymentType</a></code> | This field specifies the type of pipeline to create. |
|
|
212
|
+
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.engine">engine</a></code> | <code><a href="#projen-pipelines.PipelineEngine">PipelineEngine</a></code> | This field determines the CI/CD tooling that will be used to run the pipeline. |
|
|
213
|
+
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.githubConfig">githubConfig</a></code> | <code><a href="#projen-pipelines.GithubEngineConfig">GithubEngineConfig</a></code> | *No description.* |
|
|
214
|
+
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.postSynthCommands">postSynthCommands</a></code> | <code>string[]</code> | *No description.* |
|
|
215
|
+
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.preInstallCommands">preInstallCommands</a></code> | <code>string[]</code> | *No description.* |
|
|
216
|
+
| <code><a href="#projen-pipelines.CDKPipelineOptions.property.preSynthCommands">preSynthCommands</a></code> | <code>string[]</code> | *No description.* |
|
|
183
217
|
| <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. |
|
|
184
218
|
|
|
185
219
|
---
|
|
@@ -215,18 +249,142 @@ better organization and ease of management.
|
|
|
215
249
|
|
|
216
250
|
---
|
|
217
251
|
|
|
218
|
-
##### `
|
|
252
|
+
##### `deploymentType`<sup>Optional</sup> <a name="deploymentType" id="projen-pipelines.CDKPipelineOptions.property.deploymentType"></a>
|
|
253
|
+
|
|
254
|
+
```typescript
|
|
255
|
+
public readonly deploymentType: DeploymentType;
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
- *Type:* <a href="#projen-pipelines.DeploymentType">DeploymentType</a>
|
|
259
|
+
- *Default:* CONTINUOUS_DELIVERY
|
|
260
|
+
|
|
261
|
+
This field specifies the type of pipeline to create.
|
|
262
|
+
|
|
263
|
+
If set to CONTINUOUS_DEPLOYMENT,
|
|
264
|
+
every commit is deployed as far as possible, hopefully into production. If set to
|
|
265
|
+
CONTINUOUS_DELIVERY, every commit is built and all assets are prepared for a later deployment.
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
##### `engine`<sup>Optional</sup> <a name="engine" id="projen-pipelines.CDKPipelineOptions.property.engine"></a>
|
|
270
|
+
|
|
271
|
+
```typescript
|
|
272
|
+
public readonly engine: PipelineEngine;
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
- *Type:* <a href="#projen-pipelines.PipelineEngine">PipelineEngine</a>
|
|
276
|
+
- *Default:* tries to derive it from the projects configuration
|
|
277
|
+
|
|
278
|
+
This field determines the CI/CD tooling that will be used to run the pipeline.
|
|
279
|
+
|
|
280
|
+
The component
|
|
281
|
+
will render workflows for the given system. Options include GitHub and GitLab.
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
##### `githubConfig`<sup>Optional</sup> <a name="githubConfig" id="projen-pipelines.CDKPipelineOptions.property.githubConfig"></a>
|
|
286
|
+
|
|
287
|
+
```typescript
|
|
288
|
+
public readonly githubConfig: GithubEngineConfig;
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
- *Type:* <a href="#projen-pipelines.GithubEngineConfig">GithubEngineConfig</a>
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
##### `postSynthCommands`<sup>Optional</sup> <a name="postSynthCommands" id="projen-pipelines.CDKPipelineOptions.property.postSynthCommands"></a>
|
|
296
|
+
|
|
297
|
+
```typescript
|
|
298
|
+
public readonly postSynthCommands: string[];
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
- *Type:* string[]
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
##### `preInstallCommands`<sup>Optional</sup> <a name="preInstallCommands" id="projen-pipelines.CDKPipelineOptions.property.preInstallCommands"></a>
|
|
306
|
+
|
|
307
|
+
```typescript
|
|
308
|
+
public readonly preInstallCommands: string[];
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
- *Type:* string[]
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
##### `preSynthCommands`<sup>Optional</sup> <a name="preSynthCommands" id="projen-pipelines.CDKPipelineOptions.property.preSynthCommands"></a>
|
|
316
|
+
|
|
317
|
+
```typescript
|
|
318
|
+
public readonly preSynthCommands: string[];
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
- *Type:* string[]
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
##### `stackPrefix`<sup>Optional</sup> <a name="stackPrefix" id="projen-pipelines.CDKPipelineOptions.property.stackPrefix"></a>
|
|
219
326
|
|
|
220
327
|
```typescript
|
|
221
328
|
public readonly stackPrefix: string;
|
|
222
329
|
```
|
|
223
330
|
|
|
224
331
|
- *Type:* string
|
|
332
|
+
- *Default:* project name
|
|
225
333
|
|
|
226
334
|
This field is used to define a prefix for the AWS Stack resources created during the pipeline's operation.
|
|
227
335
|
|
|
228
336
|
---
|
|
229
337
|
|
|
338
|
+
### DeployStageOptions <a name="DeployStageOptions" id="projen-pipelines.DeployStageOptions"></a>
|
|
339
|
+
|
|
340
|
+
#### Initializer <a name="Initializer" id="projen-pipelines.DeployStageOptions.Initializer"></a>
|
|
341
|
+
|
|
342
|
+
```typescript
|
|
343
|
+
import { DeployStageOptions } from 'projen-pipelines'
|
|
344
|
+
|
|
345
|
+
const deployStageOptions: DeployStageOptions = { ... }
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
349
|
+
|
|
350
|
+
| **Name** | **Type** | **Description** |
|
|
351
|
+
| --- | --- | --- |
|
|
352
|
+
| <code><a href="#projen-pipelines.DeployStageOptions.property.commands">commands</a></code> | <code>string[]</code> | *No description.* |
|
|
353
|
+
| <code><a href="#projen-pipelines.DeployStageOptions.property.env">env</a></code> | <code><a href="#projen-pipelines.Environment">Environment</a></code> | *No description.* |
|
|
354
|
+
| <code><a href="#projen-pipelines.DeployStageOptions.property.stageName">stageName</a></code> | <code>string</code> | *No description.* |
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
##### `commands`<sup>Required</sup> <a name="commands" id="projen-pipelines.DeployStageOptions.property.commands"></a>
|
|
359
|
+
|
|
360
|
+
```typescript
|
|
361
|
+
public readonly commands: string[];
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
- *Type:* string[]
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
##### `env`<sup>Required</sup> <a name="env" id="projen-pipelines.DeployStageOptions.property.env"></a>
|
|
369
|
+
|
|
370
|
+
```typescript
|
|
371
|
+
public readonly env: Environment;
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
- *Type:* <a href="#projen-pipelines.Environment">Environment</a>
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
##### `stageName`<sup>Required</sup> <a name="stageName" id="projen-pipelines.DeployStageOptions.property.stageName"></a>
|
|
379
|
+
|
|
380
|
+
```typescript
|
|
381
|
+
public readonly stageName: string;
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
- *Type:* string
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
230
388
|
### Environment <a name="Environment" id="projen-pipelines.Environment"></a>
|
|
231
389
|
|
|
232
390
|
The Environment interface is designed to hold AWS related information for a specific deployment environment within your infrastructure.
|
|
@@ -365,8 +523,232 @@ It should be stable and only receive thoroughly tested changes.
|
|
|
365
523
|
|
|
366
524
|
---
|
|
367
525
|
|
|
526
|
+
### GithubEngineConfig <a name="GithubEngineConfig" id="projen-pipelines.GithubEngineConfig"></a>
|
|
527
|
+
|
|
528
|
+
#### Initializer <a name="Initializer" id="projen-pipelines.GithubEngineConfig.Initializer"></a>
|
|
529
|
+
|
|
530
|
+
```typescript
|
|
531
|
+
import { GithubEngineConfig } from 'projen-pipelines'
|
|
532
|
+
|
|
533
|
+
const githubEngineConfig: GithubEngineConfig = { ... }
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
537
|
+
|
|
538
|
+
| **Name** | **Type** | **Description** |
|
|
539
|
+
| --- | --- | --- |
|
|
540
|
+
| <code><a href="#projen-pipelines.GithubEngineConfig.property.awsRoleArnForAssetPublishing">awsRoleArnForAssetPublishing</a></code> | <code>string</code> | *No description.* |
|
|
541
|
+
| <code><a href="#projen-pipelines.GithubEngineConfig.property.awsRoleArnForDeployment">awsRoleArnForDeployment</a></code> | <code><a href="#projen-pipelines.RoleMap">RoleMap</a></code> | *No description.* |
|
|
542
|
+
| <code><a href="#projen-pipelines.GithubEngineConfig.property.awsRoleArnForSynth">awsRoleArnForSynth</a></code> | <code>string</code> | *No description.* |
|
|
543
|
+
| <code><a href="#projen-pipelines.GithubEngineConfig.property.defaultAwsRoleArn">defaultAwsRoleArn</a></code> | <code>string</code> | *No description.* |
|
|
544
|
+
|
|
545
|
+
---
|
|
546
|
+
|
|
547
|
+
##### `awsRoleArnForAssetPublishing`<sup>Optional</sup> <a name="awsRoleArnForAssetPublishing" id="projen-pipelines.GithubEngineConfig.property.awsRoleArnForAssetPublishing"></a>
|
|
548
|
+
|
|
549
|
+
```typescript
|
|
550
|
+
public readonly awsRoleArnForAssetPublishing: string;
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
- *Type:* string
|
|
554
|
+
|
|
555
|
+
---
|
|
556
|
+
|
|
557
|
+
##### `awsRoleArnForDeployment`<sup>Optional</sup> <a name="awsRoleArnForDeployment" id="projen-pipelines.GithubEngineConfig.property.awsRoleArnForDeployment"></a>
|
|
558
|
+
|
|
559
|
+
```typescript
|
|
560
|
+
public readonly awsRoleArnForDeployment: RoleMap;
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
- *Type:* <a href="#projen-pipelines.RoleMap">RoleMap</a>
|
|
564
|
+
|
|
565
|
+
---
|
|
566
|
+
|
|
567
|
+
##### `awsRoleArnForSynth`<sup>Optional</sup> <a name="awsRoleArnForSynth" id="projen-pipelines.GithubEngineConfig.property.awsRoleArnForSynth"></a>
|
|
568
|
+
|
|
569
|
+
```typescript
|
|
570
|
+
public readonly awsRoleArnForSynth: string;
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
- *Type:* string
|
|
574
|
+
|
|
575
|
+
---
|
|
576
|
+
|
|
577
|
+
##### `defaultAwsRoleArn`<sup>Optional</sup> <a name="defaultAwsRoleArn" id="projen-pipelines.GithubEngineConfig.property.defaultAwsRoleArn"></a>
|
|
578
|
+
|
|
579
|
+
```typescript
|
|
580
|
+
public readonly defaultAwsRoleArn: string;
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
- *Type:* string
|
|
584
|
+
|
|
585
|
+
---
|
|
586
|
+
|
|
587
|
+
### RoleMap <a name="RoleMap" id="projen-pipelines.RoleMap"></a>
|
|
588
|
+
|
|
589
|
+
#### Initializer <a name="Initializer" id="projen-pipelines.RoleMap.Initializer"></a>
|
|
590
|
+
|
|
591
|
+
```typescript
|
|
592
|
+
import { RoleMap } from 'projen-pipelines'
|
|
593
|
+
|
|
594
|
+
const roleMap: RoleMap = { ... }
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
598
|
+
|
|
599
|
+
| **Name** | **Type** | **Description** |
|
|
600
|
+
| --- | --- | --- |
|
|
601
|
+
| <code><a href="#projen-pipelines.RoleMap.property.dev">dev</a></code> | <code>string</code> | *No description.* |
|
|
602
|
+
| <code><a href="#projen-pipelines.RoleMap.property.feature">feature</a></code> | <code>string</code> | *No description.* |
|
|
603
|
+
| <code><a href="#projen-pipelines.RoleMap.property.prod">prod</a></code> | <code>string</code> | *No description.* |
|
|
604
|
+
|
|
605
|
+
---
|
|
606
|
+
|
|
607
|
+
##### `dev`<sup>Optional</sup> <a name="dev" id="projen-pipelines.RoleMap.property.dev"></a>
|
|
608
|
+
|
|
609
|
+
```typescript
|
|
610
|
+
public readonly dev: string;
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
- *Type:* string
|
|
614
|
+
|
|
615
|
+
---
|
|
616
|
+
|
|
617
|
+
##### `feature`<sup>Optional</sup> <a name="feature" id="projen-pipelines.RoleMap.property.feature"></a>
|
|
618
|
+
|
|
619
|
+
```typescript
|
|
620
|
+
public readonly feature: string;
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
- *Type:* string
|
|
624
|
+
|
|
625
|
+
---
|
|
626
|
+
|
|
627
|
+
##### `prod`<sup>Optional</sup> <a name="prod" id="projen-pipelines.RoleMap.property.prod"></a>
|
|
628
|
+
|
|
629
|
+
```typescript
|
|
630
|
+
public readonly prod: string;
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
- *Type:* string
|
|
634
|
+
|
|
635
|
+
---
|
|
636
|
+
|
|
637
|
+
### SynthStageOptions <a name="SynthStageOptions" id="projen-pipelines.SynthStageOptions"></a>
|
|
638
|
+
|
|
639
|
+
#### Initializer <a name="Initializer" id="projen-pipelines.SynthStageOptions.Initializer"></a>
|
|
640
|
+
|
|
641
|
+
```typescript
|
|
642
|
+
import { SynthStageOptions } from 'projen-pipelines'
|
|
643
|
+
|
|
644
|
+
const synthStageOptions: SynthStageOptions = { ... }
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
648
|
+
|
|
649
|
+
| **Name** | **Type** | **Description** |
|
|
650
|
+
| --- | --- | --- |
|
|
651
|
+
| <code><a href="#projen-pipelines.SynthStageOptions.property.commands">commands</a></code> | <code>string[]</code> | *No description.* |
|
|
652
|
+
|
|
653
|
+
---
|
|
654
|
+
|
|
655
|
+
##### `commands`<sup>Required</sup> <a name="commands" id="projen-pipelines.SynthStageOptions.property.commands"></a>
|
|
656
|
+
|
|
657
|
+
```typescript
|
|
658
|
+
public readonly commands: string[];
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
- *Type:* string[]
|
|
662
|
+
|
|
663
|
+
---
|
|
664
|
+
|
|
368
665
|
## Classes <a name="Classes" id="Classes"></a>
|
|
369
666
|
|
|
667
|
+
### BaseEngine <a name="BaseEngine" id="projen-pipelines.BaseEngine"></a>
|
|
668
|
+
|
|
669
|
+
#### Initializers <a name="Initializers" id="projen-pipelines.BaseEngine.Initializer"></a>
|
|
670
|
+
|
|
671
|
+
```typescript
|
|
672
|
+
import { BaseEngine } from 'projen-pipelines'
|
|
673
|
+
|
|
674
|
+
new BaseEngine(app: AwsCdkTypeScriptApp, props: CDKPipelineOptions, pipeline: CDKPipeline)
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
| **Name** | **Type** | **Description** |
|
|
678
|
+
| --- | --- | --- |
|
|
679
|
+
| <code><a href="#projen-pipelines.BaseEngine.Initializer.parameter.app">app</a></code> | <code>projen.awscdk.AwsCdkTypeScriptApp</code> | *No description.* |
|
|
680
|
+
| <code><a href="#projen-pipelines.BaseEngine.Initializer.parameter.props">props</a></code> | <code><a href="#projen-pipelines.CDKPipelineOptions">CDKPipelineOptions</a></code> | *No description.* |
|
|
681
|
+
| <code><a href="#projen-pipelines.BaseEngine.Initializer.parameter.pipeline">pipeline</a></code> | <code><a href="#projen-pipelines.CDKPipeline">CDKPipeline</a></code> | *No description.* |
|
|
682
|
+
|
|
683
|
+
---
|
|
684
|
+
|
|
685
|
+
##### `app`<sup>Required</sup> <a name="app" id="projen-pipelines.BaseEngine.Initializer.parameter.app"></a>
|
|
686
|
+
|
|
687
|
+
- *Type:* projen.awscdk.AwsCdkTypeScriptApp
|
|
688
|
+
|
|
689
|
+
---
|
|
690
|
+
|
|
691
|
+
##### `props`<sup>Required</sup> <a name="props" id="projen-pipelines.BaseEngine.Initializer.parameter.props"></a>
|
|
692
|
+
|
|
693
|
+
- *Type:* <a href="#projen-pipelines.CDKPipelineOptions">CDKPipelineOptions</a>
|
|
694
|
+
|
|
695
|
+
---
|
|
696
|
+
|
|
697
|
+
##### `pipeline`<sup>Required</sup> <a name="pipeline" id="projen-pipelines.BaseEngine.Initializer.parameter.pipeline"></a>
|
|
698
|
+
|
|
699
|
+
- *Type:* <a href="#projen-pipelines.CDKPipeline">CDKPipeline</a>
|
|
700
|
+
|
|
701
|
+
---
|
|
702
|
+
|
|
703
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
704
|
+
|
|
705
|
+
| **Name** | **Description** |
|
|
706
|
+
| --- | --- |
|
|
707
|
+
| <code><a href="#projen-pipelines.BaseEngine.createAssetUpload">createAssetUpload</a></code> | *No description.* |
|
|
708
|
+
| <code><a href="#projen-pipelines.BaseEngine.createDeployment">createDeployment</a></code> | *No description.* |
|
|
709
|
+
| <code><a href="#projen-pipelines.BaseEngine.createSynth">createSynth</a></code> | *No description.* |
|
|
710
|
+
|
|
711
|
+
---
|
|
712
|
+
|
|
713
|
+
##### `createAssetUpload` <a name="createAssetUpload" id="projen-pipelines.BaseEngine.createAssetUpload"></a>
|
|
714
|
+
|
|
715
|
+
```typescript
|
|
716
|
+
public createAssetUpload(options: AssetUploadStageOptions): void
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
###### `options`<sup>Required</sup> <a name="options" id="projen-pipelines.BaseEngine.createAssetUpload.parameter.options"></a>
|
|
720
|
+
|
|
721
|
+
- *Type:* <a href="#projen-pipelines.AssetUploadStageOptions">AssetUploadStageOptions</a>
|
|
722
|
+
|
|
723
|
+
---
|
|
724
|
+
|
|
725
|
+
##### `createDeployment` <a name="createDeployment" id="projen-pipelines.BaseEngine.createDeployment"></a>
|
|
726
|
+
|
|
727
|
+
```typescript
|
|
728
|
+
public createDeployment(options: DeployStageOptions): void
|
|
729
|
+
```
|
|
730
|
+
|
|
731
|
+
###### `options`<sup>Required</sup> <a name="options" id="projen-pipelines.BaseEngine.createDeployment.parameter.options"></a>
|
|
732
|
+
|
|
733
|
+
- *Type:* <a href="#projen-pipelines.DeployStageOptions">DeployStageOptions</a>
|
|
734
|
+
|
|
735
|
+
---
|
|
736
|
+
|
|
737
|
+
##### `createSynth` <a name="createSynth" id="projen-pipelines.BaseEngine.createSynth"></a>
|
|
738
|
+
|
|
739
|
+
```typescript
|
|
740
|
+
public createSynth(options: SynthStageOptions): void
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
###### `options`<sup>Required</sup> <a name="options" id="projen-pipelines.BaseEngine.createSynth.parameter.options"></a>
|
|
744
|
+
|
|
745
|
+
- *Type:* <a href="#projen-pipelines.SynthStageOptions">SynthStageOptions</a>
|
|
746
|
+
|
|
747
|
+
---
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
|
|
370
752
|
### CDKPipeline <a name="CDKPipeline" id="projen-pipelines.CDKPipeline"></a>
|
|
371
753
|
|
|
372
754
|
The CDKPipeline class extends the Component class and sets up the necessary configuration for deploying AWS CDK (Cloud Development Kit) applications across multiple stages.
|
|
@@ -442,6 +824,8 @@ Synthesizes files to the project output directory.
|
|
|
442
824
|
| **Name** | **Type** | **Description** |
|
|
443
825
|
| --- | --- | --- |
|
|
444
826
|
| <code><a href="#projen-pipelines.CDKPipeline.property.project">project</a></code> | <code>projen.Project</code> | *No description.* |
|
|
827
|
+
| <code><a href="#projen-pipelines.CDKPipeline.property.engine">engine</a></code> | <code><a href="#projen-pipelines.BaseEngine">BaseEngine</a></code> | *No description.* |
|
|
828
|
+
| <code><a href="#projen-pipelines.CDKPipeline.property.stackPrefix">stackPrefix</a></code> | <code>string</code> | *No description.* |
|
|
445
829
|
|
|
446
830
|
---
|
|
447
831
|
|
|
@@ -455,5 +839,169 @@ public readonly project: Project;
|
|
|
455
839
|
|
|
456
840
|
---
|
|
457
841
|
|
|
842
|
+
##### `engine`<sup>Required</sup> <a name="engine" id="projen-pipelines.CDKPipeline.property.engine"></a>
|
|
843
|
+
|
|
844
|
+
```typescript
|
|
845
|
+
public readonly engine: BaseEngine;
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
- *Type:* <a href="#projen-pipelines.BaseEngine">BaseEngine</a>
|
|
849
|
+
|
|
850
|
+
---
|
|
851
|
+
|
|
852
|
+
##### `stackPrefix`<sup>Required</sup> <a name="stackPrefix" id="projen-pipelines.CDKPipeline.property.stackPrefix"></a>
|
|
853
|
+
|
|
854
|
+
```typescript
|
|
855
|
+
public readonly stackPrefix: string;
|
|
856
|
+
```
|
|
857
|
+
|
|
858
|
+
- *Type:* string
|
|
859
|
+
|
|
860
|
+
---
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
### GitHubEngine <a name="GitHubEngine" id="projen-pipelines.GitHubEngine"></a>
|
|
864
|
+
|
|
865
|
+
#### Initializers <a name="Initializers" id="projen-pipelines.GitHubEngine.Initializer"></a>
|
|
866
|
+
|
|
867
|
+
```typescript
|
|
868
|
+
import { GitHubEngine } from 'projen-pipelines'
|
|
458
869
|
|
|
870
|
+
new GitHubEngine(app: AwsCdkTypeScriptApp, props: CDKPipelineOptions, pipeline: CDKPipeline)
|
|
871
|
+
```
|
|
872
|
+
|
|
873
|
+
| **Name** | **Type** | **Description** |
|
|
874
|
+
| --- | --- | --- |
|
|
875
|
+
| <code><a href="#projen-pipelines.GitHubEngine.Initializer.parameter.app">app</a></code> | <code>projen.awscdk.AwsCdkTypeScriptApp</code> | *No description.* |
|
|
876
|
+
| <code><a href="#projen-pipelines.GitHubEngine.Initializer.parameter.props">props</a></code> | <code><a href="#projen-pipelines.CDKPipelineOptions">CDKPipelineOptions</a></code> | *No description.* |
|
|
877
|
+
| <code><a href="#projen-pipelines.GitHubEngine.Initializer.parameter.pipeline">pipeline</a></code> | <code><a href="#projen-pipelines.CDKPipeline">CDKPipeline</a></code> | *No description.* |
|
|
878
|
+
|
|
879
|
+
---
|
|
880
|
+
|
|
881
|
+
##### `app`<sup>Required</sup> <a name="app" id="projen-pipelines.GitHubEngine.Initializer.parameter.app"></a>
|
|
882
|
+
|
|
883
|
+
- *Type:* projen.awscdk.AwsCdkTypeScriptApp
|
|
884
|
+
|
|
885
|
+
---
|
|
886
|
+
|
|
887
|
+
##### `props`<sup>Required</sup> <a name="props" id="projen-pipelines.GitHubEngine.Initializer.parameter.props"></a>
|
|
888
|
+
|
|
889
|
+
- *Type:* <a href="#projen-pipelines.CDKPipelineOptions">CDKPipelineOptions</a>
|
|
890
|
+
|
|
891
|
+
---
|
|
892
|
+
|
|
893
|
+
##### `pipeline`<sup>Required</sup> <a name="pipeline" id="projen-pipelines.GitHubEngine.Initializer.parameter.pipeline"></a>
|
|
894
|
+
|
|
895
|
+
- *Type:* <a href="#projen-pipelines.CDKPipeline">CDKPipeline</a>
|
|
896
|
+
|
|
897
|
+
---
|
|
898
|
+
|
|
899
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
900
|
+
|
|
901
|
+
| **Name** | **Description** |
|
|
902
|
+
| --- | --- |
|
|
903
|
+
| <code><a href="#projen-pipelines.GitHubEngine.createAssetUpload">createAssetUpload</a></code> | *No description.* |
|
|
904
|
+
| <code><a href="#projen-pipelines.GitHubEngine.createDeployment">createDeployment</a></code> | *No description.* |
|
|
905
|
+
| <code><a href="#projen-pipelines.GitHubEngine.createSynth">createSynth</a></code> | *No description.* |
|
|
906
|
+
|
|
907
|
+
---
|
|
908
|
+
|
|
909
|
+
##### `createAssetUpload` <a name="createAssetUpload" id="projen-pipelines.GitHubEngine.createAssetUpload"></a>
|
|
910
|
+
|
|
911
|
+
```typescript
|
|
912
|
+
public createAssetUpload(options: AssetUploadStageOptions): void
|
|
913
|
+
```
|
|
914
|
+
|
|
915
|
+
###### `options`<sup>Required</sup> <a name="options" id="projen-pipelines.GitHubEngine.createAssetUpload.parameter.options"></a>
|
|
916
|
+
|
|
917
|
+
- *Type:* <a href="#projen-pipelines.AssetUploadStageOptions">AssetUploadStageOptions</a>
|
|
918
|
+
|
|
919
|
+
---
|
|
920
|
+
|
|
921
|
+
##### `createDeployment` <a name="createDeployment" id="projen-pipelines.GitHubEngine.createDeployment"></a>
|
|
922
|
+
|
|
923
|
+
```typescript
|
|
924
|
+
public createDeployment(options: DeployStageOptions): void
|
|
925
|
+
```
|
|
926
|
+
|
|
927
|
+
###### `options`<sup>Required</sup> <a name="options" id="projen-pipelines.GitHubEngine.createDeployment.parameter.options"></a>
|
|
928
|
+
|
|
929
|
+
- *Type:* <a href="#projen-pipelines.DeployStageOptions">DeployStageOptions</a>
|
|
930
|
+
|
|
931
|
+
---
|
|
932
|
+
|
|
933
|
+
##### `createSynth` <a name="createSynth" id="projen-pipelines.GitHubEngine.createSynth"></a>
|
|
934
|
+
|
|
935
|
+
```typescript
|
|
936
|
+
public createSynth(options: SynthStageOptions): void
|
|
937
|
+
```
|
|
938
|
+
|
|
939
|
+
###### `options`<sup>Required</sup> <a name="options" id="projen-pipelines.GitHubEngine.createSynth.parameter.options"></a>
|
|
940
|
+
|
|
941
|
+
- *Type:* <a href="#projen-pipelines.SynthStageOptions">SynthStageOptions</a>
|
|
942
|
+
|
|
943
|
+
---
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
## Enums <a name="Enums" id="Enums"></a>
|
|
950
|
+
|
|
951
|
+
### DeploymentType <a name="DeploymentType" id="projen-pipelines.DeploymentType"></a>
|
|
952
|
+
|
|
953
|
+
Describes the type of pipeline that will be created.
|
|
954
|
+
|
|
955
|
+
#### Members <a name="Members" id="Members"></a>
|
|
956
|
+
|
|
957
|
+
| **Name** | **Description** |
|
|
958
|
+
| --- | --- |
|
|
959
|
+
| <code><a href="#projen-pipelines.DeploymentType.CONTINUOUS_DEPLOYMENT">CONTINUOUS_DEPLOYMENT</a></code> | Deploy every commit as far as possible; |
|
|
960
|
+
| <code><a href="#projen-pipelines.DeploymentType.CONTINUOUS_DELIVERY">CONTINUOUS_DELIVERY</a></code> | Build every commit and prepare all assets for a later deployment. |
|
|
961
|
+
|
|
962
|
+
---
|
|
963
|
+
|
|
964
|
+
##### `CONTINUOUS_DEPLOYMENT` <a name="CONTINUOUS_DEPLOYMENT" id="projen-pipelines.DeploymentType.CONTINUOUS_DEPLOYMENT"></a>
|
|
965
|
+
|
|
966
|
+
Deploy every commit as far as possible;
|
|
967
|
+
|
|
968
|
+
hopefully into production
|
|
969
|
+
|
|
970
|
+
---
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
##### `CONTINUOUS_DELIVERY` <a name="CONTINUOUS_DELIVERY" id="projen-pipelines.DeploymentType.CONTINUOUS_DELIVERY"></a>
|
|
974
|
+
|
|
975
|
+
Build every commit and prepare all assets for a later deployment.
|
|
976
|
+
|
|
977
|
+
---
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
### PipelineEngine <a name="PipelineEngine" id="projen-pipelines.PipelineEngine"></a>
|
|
981
|
+
|
|
982
|
+
The CI/CD tooling used to run your pipeline.
|
|
983
|
+
|
|
984
|
+
The component will render workflows for the given system
|
|
985
|
+
|
|
986
|
+
#### Members <a name="Members" id="Members"></a>
|
|
987
|
+
|
|
988
|
+
| **Name** | **Description** |
|
|
989
|
+
| --- | --- |
|
|
990
|
+
| <code><a href="#projen-pipelines.PipelineEngine.GITHUB">GITHUB</a></code> | Create GitHub actions. |
|
|
991
|
+
| <code><a href="#projen-pipelines.PipelineEngine.GITLAB">GITLAB</a></code> | Create a .gitlab-ci.yaml file. |
|
|
992
|
+
|
|
993
|
+
---
|
|
994
|
+
|
|
995
|
+
##### `GITHUB` <a name="GITHUB" id="projen-pipelines.PipelineEngine.GITHUB"></a>
|
|
996
|
+
|
|
997
|
+
Create GitHub actions.
|
|
998
|
+
|
|
999
|
+
---
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
##### `GITLAB` <a name="GITLAB" id="projen-pipelines.PipelineEngine.GITLAB"></a>
|
|
1003
|
+
|
|
1004
|
+
Create a .gitlab-ci.yaml file.
|
|
1005
|
+
|
|
1006
|
+
---
|
|
459
1007
|
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ With this library, you can handle complex deployment scenarios with less code an
|
|
|
13
13
|
|
|
14
14
|
### Installation
|
|
15
15
|
|
|
16
|
-
To install the package, add
|
|
16
|
+
To install the package, add the package `projen-pipelines` to your projects devDeps in your projen configuration file.
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
After installing the package, you can import and use the constructs to define your CDK Pipelines.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { awscdk } from 'projen';
|
|
2
|
+
import { CDKPipeline, CDKPipelineOptions, Environment } from '../pipeline';
|
|
3
|
+
export interface SynthStageOptions {
|
|
4
|
+
readonly commands: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface AssetUploadStageOptions {
|
|
7
|
+
readonly commands: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface DeployStageOptions {
|
|
10
|
+
readonly stageName: string;
|
|
11
|
+
readonly commands: string[];
|
|
12
|
+
readonly env: Environment;
|
|
13
|
+
}
|
|
14
|
+
export declare abstract class BaseEngine {
|
|
15
|
+
protected app: awscdk.AwsCdkTypeScriptApp;
|
|
16
|
+
protected props: CDKPipelineOptions;
|
|
17
|
+
protected pipeline: CDKPipeline;
|
|
18
|
+
constructor(app: awscdk.AwsCdkTypeScriptApp, props: CDKPipelineOptions, pipeline: CDKPipeline);
|
|
19
|
+
abstract createSynth(options: SynthStageOptions): void;
|
|
20
|
+
abstract createAssetUpload(options: AssetUploadStageOptions): void;
|
|
21
|
+
abstract createDeployment(options: DeployStageOptions): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.BaseEngine = void 0;
|
|
5
|
+
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
|
6
|
+
class BaseEngine {
|
|
7
|
+
constructor(app, props, pipeline) {
|
|
8
|
+
this.app = app;
|
|
9
|
+
this.props = props;
|
|
10
|
+
this.pipeline = pipeline;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
_a = JSII_RTTI_SYMBOL_1;
|
|
14
|
+
BaseEngine[_a] = { fqn: "projen-pipelines.BaseEngine", version: "0.0.4" };
|
|
15
|
+
exports.BaseEngine = BaseEngine;
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lbmdpbmUvYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQWlCQSxNQUFzQixVQUFVO0lBQzlCLFlBQXNCLEdBQStCLEVBQVksS0FBeUIsRUFBWSxRQUFxQjtRQUFyRyxRQUFHLEdBQUgsR0FBRyxDQUE0QjtRQUFZLFVBQUssR0FBTCxLQUFLLENBQW9CO1FBQVksYUFBUSxHQUFSLFFBQVEsQ0FBYTtJQUczSCxDQUFDOzs7O0FBSm1CLGdDQUFVIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgYXdzY2RrIH0gZnJvbSAncHJvamVuJztcbmltcG9ydCB7IENES1BpcGVsaW5lLCBDREtQaXBlbGluZU9wdGlvbnMsIEVudmlyb25tZW50IH0gZnJvbSAnLi4vcGlwZWxpbmUnO1xuXG5leHBvcnQgaW50ZXJmYWNlIFN5bnRoU3RhZ2VPcHRpb25zIHtcbiAgcmVhZG9ubHkgY29tbWFuZHM6IHN0cmluZ1tdO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIEFzc2V0VXBsb2FkU3RhZ2VPcHRpb25zIHtcbiAgcmVhZG9ubHkgY29tbWFuZHM6IHN0cmluZ1tdO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIERlcGxveVN0YWdlT3B0aW9ucyB7XG4gIHJlYWRvbmx5IHN0YWdlTmFtZTogc3RyaW5nO1xuICByZWFkb25seSBjb21tYW5kczogc3RyaW5nW107XG4gIHJlYWRvbmx5IGVudjogRW52aXJvbm1lbnQ7XG59XG5cbmV4cG9ydCBhYnN0cmFjdCBjbGFzcyBCYXNlRW5naW5lIHtcbiAgY29uc3RydWN0b3IocHJvdGVjdGVkIGFwcDogYXdzY2RrLkF3c0Nka1R5cGVTY3JpcHRBcHAsIHByb3RlY3RlZCBwcm9wczogQ0RLUGlwZWxpbmVPcHRpb25zLCBwcm90ZWN0ZWQgcGlwZWxpbmU6IENES1BpcGVsaW5lKSB7XG5cblxuICB9XG5cbiAgYWJzdHJhY3QgY3JlYXRlU3ludGgob3B0aW9uczogU3ludGhTdGFnZU9wdGlvbnMpOiB2b2lkO1xuICBhYnN0cmFjdCBjcmVhdGVBc3NldFVwbG9hZChvcHRpb25zOiBBc3NldFVwbG9hZFN0YWdlT3B0aW9ucyk6IHZvaWQ7XG4gIGFic3RyYWN0IGNyZWF0ZURlcGxveW1lbnQob3B0aW9uczogRGVwbG95U3RhZ2VPcHRpb25zKTogdm9pZDtcblxufSJdfQ==
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { awscdk } from 'projen';
|
|
2
|
+
import { AssetUploadStageOptions, BaseEngine, DeployStageOptions, SynthStageOptions } from './base';
|
|
3
|
+
import { CDKPipeline, CDKPipelineOptions } from '../pipeline';
|
|
4
|
+
export interface RoleMap {
|
|
5
|
+
readonly feature?: string;
|
|
6
|
+
readonly dev?: string;
|
|
7
|
+
readonly prod?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GithubEngineConfig {
|
|
10
|
+
readonly defaultAwsRoleArn?: string;
|
|
11
|
+
readonly awsRoleArnForSynth?: string;
|
|
12
|
+
readonly awsRoleArnForAssetPublishing?: string;
|
|
13
|
+
readonly awsRoleArnForDeployment?: RoleMap;
|
|
14
|
+
}
|
|
15
|
+
export declare class GitHubEngine extends BaseEngine {
|
|
16
|
+
private deploymentWorkflow;
|
|
17
|
+
private deploymentStages;
|
|
18
|
+
constructor(app: awscdk.AwsCdkTypeScriptApp, props: CDKPipelineOptions, pipeline: CDKPipeline);
|
|
19
|
+
createSynth(options: SynthStageOptions): void;
|
|
20
|
+
createAssetUpload(options: AssetUploadStageOptions): void;
|
|
21
|
+
createDeployment(options: DeployStageOptions): void;
|
|
22
|
+
}
|