@flit/cdk-pipeline 1.0.19 → 1.0.21
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 +198 -42
- package/dist/artifact.d.ts +1 -1
- package/dist/artifact.js +5 -5
- package/dist/code-commit-source-segment.js +5 -5
- package/dist/git-hub-source-segment.js +5 -5
- package/dist/pipeline-segment.d.ts +5 -0
- package/dist/pipeline-segment.js +3 -3
- package/dist/pipeline.js +3 -3
- package/dist/publish-assets-action.js +5 -5
- package/dist/s3-source-segment.js +5 -5
- package/dist/segment.js +5 -5
- package/dist/source-segment.js +3 -3
- package/dist/stack-segment.d.ts +11 -0
- package/dist/stack-segment.js +13 -11
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -12
- package/src/artifact.ts +2 -2
- package/src/pipeline-segment.ts +5 -1
- package/src/publish-assets-action.ts +2 -2
- package/src/stack-segment.ts +18 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flit/cdk-pipeline",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"description": "A highly customizable and extensible CI/CD pipeline intended as alternative to CDK's native CodePipeline",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -39,21 +39,21 @@
|
|
|
39
39
|
"path": "^0.12.7"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@types/node": "^
|
|
43
|
-
"aws-cdk": "^2.
|
|
44
|
-
"aws-cdk-lib": "2.
|
|
42
|
+
"@types/node": "^20.4.1",
|
|
43
|
+
"aws-cdk": "^2.87.0",
|
|
44
|
+
"aws-cdk-lib": "2.87.0",
|
|
45
45
|
"cdk-aws-lambda-powertools-layer": "^3.5.0",
|
|
46
|
-
"constructs": "10.2.
|
|
47
|
-
"jest": "^29.
|
|
48
|
-
"jsii": "^5.
|
|
49
|
-
"jsii-pacmak": "^1.
|
|
50
|
-
"ts-jest": "^29.1.
|
|
46
|
+
"constructs": "10.2.69",
|
|
47
|
+
"jest": "^29.6.1",
|
|
48
|
+
"jsii": "^5.1.6",
|
|
49
|
+
"jsii-pacmak": "^1.84.0",
|
|
50
|
+
"ts-jest": "^29.1.1",
|
|
51
51
|
"ts-node": "^10.9.1",
|
|
52
|
-
"typescript": "^5.
|
|
52
|
+
"typescript": "^5.1.6"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"aws-cdk-lib": "^2.
|
|
56
|
-
"constructs": "^10.2.
|
|
55
|
+
"aws-cdk-lib": "^2.85.0",
|
|
56
|
+
"constructs": "^10.2.61"
|
|
57
57
|
},
|
|
58
58
|
"bundledDependencies": [
|
|
59
59
|
"path"
|
package/src/artifact.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { Segment } from "./segment";
|
|
|
5
5
|
export class Artifact extends AwsArtifact {
|
|
6
6
|
private producer?: Segment;
|
|
7
7
|
private consumers: Segment[] = [];
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
8
|
+
constructor(artifactName?: string) {
|
|
9
|
+
super(artifactName);
|
|
10
10
|
}
|
|
11
11
|
produce(producer: Segment) {
|
|
12
12
|
if (this.producer) throw new Error("Artifact is already produced");
|
package/src/pipeline-segment.ts
CHANGED
|
@@ -32,12 +32,16 @@ export interface PipelineSegmentProps {
|
|
|
32
32
|
* The AWS region the given Action resides in.
|
|
33
33
|
*/
|
|
34
34
|
readonly region?: string;
|
|
35
|
-
|
|
36
35
|
/**
|
|
37
36
|
* The artifact to hold the stack deployment output file.
|
|
38
37
|
* @default no output artifact
|
|
39
38
|
*/
|
|
40
39
|
readonly output?: Artifact;
|
|
40
|
+
/**
|
|
41
|
+
* The filename for the file in the output artifact
|
|
42
|
+
* @default artifact.json
|
|
43
|
+
*/
|
|
44
|
+
readonly outputFileName?: string;
|
|
41
45
|
/**
|
|
42
46
|
* Does this stage require manual approval of the change set?
|
|
43
47
|
* @default false
|
|
@@ -62,7 +62,7 @@ export class PublishAssetsAction extends Construct implements IAction {
|
|
|
62
62
|
input: props.input,
|
|
63
63
|
project: new Project(this, id, {
|
|
64
64
|
environment: {
|
|
65
|
-
buildImage: LinuxBuildImage.
|
|
65
|
+
buildImage: LinuxBuildImage.AMAZON_LINUX_2_5,
|
|
66
66
|
},
|
|
67
67
|
role: new Role(this, "UpdatePipelineCodeCuildRole", {
|
|
68
68
|
assumedBy: new CompositePrincipal(
|
|
@@ -94,7 +94,7 @@ export class PublishAssetsAction extends Construct implements IAction {
|
|
|
94
94
|
phases: {
|
|
95
95
|
install: {
|
|
96
96
|
"runtime-versions": {
|
|
97
|
-
nodejs:
|
|
97
|
+
nodejs: "latest",
|
|
98
98
|
},
|
|
99
99
|
commands: [
|
|
100
100
|
"npm i -g npm@latest",
|
package/src/stack-segment.ts
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
CodeBuildAction,
|
|
14
14
|
ManualApprovalAction,
|
|
15
15
|
} from "aws-cdk-lib/aws-codepipeline-actions";
|
|
16
|
+
import { IRole } from "aws-cdk-lib/aws-iam";
|
|
16
17
|
import * as path from "path";
|
|
17
18
|
|
|
18
19
|
import { PublishAssetsAction } from "./publish-assets-action";
|
|
@@ -34,6 +35,10 @@ export interface StackSegmentProps {
|
|
|
34
35
|
* @example "cdk synth StackName --strict --exclusively"
|
|
35
36
|
*/
|
|
36
37
|
readonly command: string | string[];
|
|
38
|
+
/**
|
|
39
|
+
* The role for the build stage.
|
|
40
|
+
*/
|
|
41
|
+
readonly role?: IRole;
|
|
37
42
|
/**
|
|
38
43
|
* The environmental variables for the build stage.
|
|
39
44
|
*/
|
|
@@ -56,6 +61,11 @@ export interface StackSegmentProps {
|
|
|
56
61
|
* @default no output artifact
|
|
57
62
|
*/
|
|
58
63
|
readonly output?: Artifact;
|
|
64
|
+
/**
|
|
65
|
+
* The filename for the file in the output artifact
|
|
66
|
+
* @default artifact.json
|
|
67
|
+
*/
|
|
68
|
+
readonly outputFileName?: string;
|
|
59
69
|
/**
|
|
60
70
|
* Does this stage require manual approval of the change set?
|
|
61
71
|
* @default false
|
|
@@ -97,6 +107,7 @@ export interface StackSegmentConstructedProps {
|
|
|
97
107
|
readonly input: Artifact;
|
|
98
108
|
readonly extraInputs?: Artifact[];
|
|
99
109
|
readonly output?: Artifact;
|
|
110
|
+
readonly outputFileName?: string;
|
|
100
111
|
readonly manualApproval?: Boolean;
|
|
101
112
|
}
|
|
102
113
|
|
|
@@ -126,7 +137,7 @@ export class StackSegmentConstructed extends SegmentConstructed {
|
|
|
126
137
|
project: new Project(this, "UpdateCodeBuild", {
|
|
127
138
|
environment: {
|
|
128
139
|
computeType: ComputeType.MEDIUM,
|
|
129
|
-
buildImage: LinuxBuildImage.
|
|
140
|
+
buildImage: LinuxBuildImage.AMAZON_LINUX_2_5,
|
|
130
141
|
privileged: true,
|
|
131
142
|
},
|
|
132
143
|
buildSpec: BuildSpec.fromObject({
|
|
@@ -134,8 +145,8 @@ export class StackSegmentConstructed extends SegmentConstructed {
|
|
|
134
145
|
phases: {
|
|
135
146
|
install: {
|
|
136
147
|
"runtime-versions": {
|
|
137
|
-
docker:
|
|
138
|
-
nodejs:
|
|
148
|
+
docker: "latest",
|
|
149
|
+
nodejs: "latest",
|
|
139
150
|
},
|
|
140
151
|
commands: ["npm i -g npm@latest", "npm ci"],
|
|
141
152
|
},
|
|
@@ -186,8 +197,10 @@ export class StackSegmentConstructed extends SegmentConstructed {
|
|
|
186
197
|
region: props.region,
|
|
187
198
|
changeSetName: `${props.stack.stackName}Changes`,
|
|
188
199
|
output: props.output,
|
|
189
|
-
outputFileName: props.
|
|
190
|
-
?
|
|
200
|
+
outputFileName: props.outputFileName
|
|
201
|
+
? props.outputFileName
|
|
202
|
+
: props.output
|
|
203
|
+
? `artifact.json`
|
|
191
204
|
: undefined,
|
|
192
205
|
}),
|
|
193
206
|
];
|