@flit/cdk-pipeline 1.2.3 → 1.3.0
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 +99 -66
- package/dist/artifact.js +1 -1
- package/dist/code-commit-source-segment.js +5 -5
- package/dist/code-star-source-segment.d.ts +3 -3
- package/dist/code-star-source-segment.js +5 -5
- package/dist/git-hub-source-segment.d.ts +3 -3
- package/dist/git-hub-source-segment.js +5 -5
- package/dist/pipeline-segment.js +2 -2
- package/dist/pipeline.d.ts +1 -1
- package/dist/pipeline.js +2 -2
- package/dist/publish-assets-action.js +1 -1
- package/dist/s3-source-segment.js +5 -5
- package/dist/segment.js +2 -2
- package/dist/source-segment.js +1 -1
- package/dist/stack-segment.d.ts +9 -4
- package/dist/stack-segment.js +13 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/code-commit-source-segment.ts +5 -9
- package/src/code-star-source-segment.ts +5 -5
- package/src/git-hub-source-segment.ts +5 -5
- package/src/pipeline.ts +1 -1
- package/src/s3-source-segment.ts +2 -2
- package/src/stack-segment.ts +19 -9
package/package.json
CHANGED
|
@@ -27,16 +27,12 @@ export class CodeCommitSourceSegment extends SourceSegment {
|
|
|
27
27
|
this.props = props;
|
|
28
28
|
}
|
|
29
29
|
construct(scope: Pipeline): SegmentConstructed {
|
|
30
|
-
const name = `${this.props.repository}
|
|
30
|
+
const name = `${this.props.repository}-${this.props.branch || "master"}`;
|
|
31
31
|
|
|
32
|
-
return new CodeCommitSourceSegmentConstructed(
|
|
33
|
-
|
|
34
|
-
name
|
|
35
|
-
|
|
36
|
-
...this.props,
|
|
37
|
-
actionName: name,
|
|
38
|
-
},
|
|
39
|
-
);
|
|
32
|
+
return new CodeCommitSourceSegmentConstructed(scope, name, {
|
|
33
|
+
...this.props,
|
|
34
|
+
actionName: name,
|
|
35
|
+
});
|
|
40
36
|
}
|
|
41
37
|
}
|
|
42
38
|
|
|
@@ -9,7 +9,7 @@ import { SourceSegment, SourceSegmentProps } from "./source-segment";
|
|
|
9
9
|
export interface CodeStarSourceSegmentProps extends SourceSegmentProps {
|
|
10
10
|
/**
|
|
11
11
|
* The owning user or organization of the repository.
|
|
12
|
-
* @example
|
|
12
|
+
* @example "aws"
|
|
13
13
|
*/
|
|
14
14
|
readonly owner: string;
|
|
15
15
|
/**
|
|
@@ -21,12 +21,12 @@ export interface CodeStarSourceSegmentProps extends SourceSegmentProps {
|
|
|
21
21
|
readonly connectionArn: string;
|
|
22
22
|
/**
|
|
23
23
|
* The name of the repository.
|
|
24
|
-
* @example
|
|
24
|
+
* @example "aws-cdk"
|
|
25
25
|
*/
|
|
26
26
|
readonly repository: string;
|
|
27
27
|
/**
|
|
28
28
|
* The branch to build.
|
|
29
|
-
* @default
|
|
29
|
+
* @default "master"
|
|
30
30
|
*/
|
|
31
31
|
readonly branch?: string;
|
|
32
32
|
readonly triggerOnPush?: boolean;
|
|
@@ -43,11 +43,11 @@ export class CodeStarSourceSegment extends SourceSegment {
|
|
|
43
43
|
this.props = props;
|
|
44
44
|
}
|
|
45
45
|
construct(scope: Pipeline): SegmentConstructed {
|
|
46
|
-
const name = `${this.props.owner}
|
|
46
|
+
const name = `${this.props.owner}-${this.props.repository}-${
|
|
47
47
|
this.props.branch || "master"
|
|
48
48
|
}`;
|
|
49
49
|
|
|
50
|
-
return new CodeStarSourceSegmentConstructed(scope, name
|
|
50
|
+
return new CodeStarSourceSegmentConstructed(scope, name, {
|
|
51
51
|
...this.props,
|
|
52
52
|
actionName: name,
|
|
53
53
|
repo: this.props.repository,
|
|
@@ -14,17 +14,17 @@ export interface GitHubSourceSegmentProps extends SourceSegmentProps {
|
|
|
14
14
|
readonly oauthToken: SecretValue;
|
|
15
15
|
/**
|
|
16
16
|
* The owning user or organization of the repository.
|
|
17
|
-
* @example
|
|
17
|
+
* @example "aws"
|
|
18
18
|
*/
|
|
19
19
|
readonly owner: string;
|
|
20
20
|
/**
|
|
21
21
|
* The name of the repository.
|
|
22
|
-
* @example
|
|
22
|
+
* @example "aws-cdk"
|
|
23
23
|
*/
|
|
24
24
|
readonly repository: string;
|
|
25
25
|
/**
|
|
26
26
|
* The branch to build.
|
|
27
|
-
* @default
|
|
27
|
+
* @default "master"
|
|
28
28
|
*/
|
|
29
29
|
readonly branch?: string;
|
|
30
30
|
readonly trigger?: GitHubTrigger;
|
|
@@ -41,11 +41,11 @@ export class GitHubSourceSegment extends SourceSegment {
|
|
|
41
41
|
this.props = props;
|
|
42
42
|
}
|
|
43
43
|
construct(scope: Pipeline): SegmentConstructed {
|
|
44
|
-
const name = `${this.props.owner}
|
|
44
|
+
const name = `${this.props.owner}-${this.props.repository}-${
|
|
45
45
|
this.props.branch || "master"
|
|
46
46
|
}`;
|
|
47
47
|
|
|
48
|
-
return new GitHubSourceSegmentConstructed(scope, name
|
|
48
|
+
return new GitHubSourceSegmentConstructed(scope, name, {
|
|
49
49
|
...this.props,
|
|
50
50
|
actionName: name,
|
|
51
51
|
repo: this.props.repository,
|
package/src/pipeline.ts
CHANGED
package/src/s3-source-segment.ts
CHANGED
|
@@ -29,9 +29,9 @@ export class S3SourceSegment extends SourceSegment {
|
|
|
29
29
|
this.props = props;
|
|
30
30
|
}
|
|
31
31
|
construct(scope: Pipeline): SegmentConstructed {
|
|
32
|
-
const name = `${this.props.bucket}
|
|
32
|
+
const name = `${this.props.bucket}-${this.props.bucketKey}`;
|
|
33
33
|
|
|
34
|
-
return new S3SourceSegmentConstructed(scope, name
|
|
34
|
+
return new S3SourceSegmentConstructed(scope, name, {
|
|
35
35
|
...this.props,
|
|
36
36
|
actionName: name,
|
|
37
37
|
});
|
package/src/stack-segment.ts
CHANGED
|
@@ -48,18 +48,22 @@ export interface StackSegmentProps {
|
|
|
48
48
|
* @default The name of the given stack.
|
|
49
49
|
*/
|
|
50
50
|
readonly stackName?: string;
|
|
51
|
+
/**
|
|
52
|
+
* The artifact to hold the output of the build if this stack includes a build.
|
|
53
|
+
*/
|
|
54
|
+
readonly buildOutput?: Artifact;
|
|
51
55
|
/**
|
|
52
56
|
* The artifact to hold the stack deployment output file.
|
|
53
57
|
*/
|
|
54
|
-
readonly
|
|
58
|
+
readonly stackOutput?: Artifact;
|
|
55
59
|
/**
|
|
56
60
|
* The filename for the file in the output artifact
|
|
57
|
-
* @default
|
|
61
|
+
* @default "artifact.json"
|
|
58
62
|
*/
|
|
59
63
|
readonly outputFileName?: string;
|
|
60
64
|
/**
|
|
61
65
|
* Does this stage require manual approval of the change set?
|
|
62
|
-
* @default
|
|
66
|
+
* @default false
|
|
63
67
|
*/
|
|
64
68
|
readonly manualApproval?: Boolean;
|
|
65
69
|
}
|
|
@@ -71,7 +75,10 @@ export class StackSegment extends Segment {
|
|
|
71
75
|
readonly props: StackSegmentProps;
|
|
72
76
|
|
|
73
77
|
constructor(props: StackSegmentProps) {
|
|
74
|
-
super(
|
|
78
|
+
super({
|
|
79
|
+
...props,
|
|
80
|
+
output: [props.buildOutput, props.stackOutput].filter((a) => !!a),
|
|
81
|
+
});
|
|
75
82
|
this.props = props;
|
|
76
83
|
}
|
|
77
84
|
|
|
@@ -95,7 +102,8 @@ export interface StackSegmentConstructedProps {
|
|
|
95
102
|
readonly stackName?: string;
|
|
96
103
|
readonly input: Artifact;
|
|
97
104
|
readonly extraInputs?: Artifact[];
|
|
98
|
-
readonly
|
|
105
|
+
readonly buildOutput?: Artifact;
|
|
106
|
+
readonly stackOutput?: Artifact;
|
|
99
107
|
readonly outputFileName?: string;
|
|
100
108
|
readonly manualApproval?: Boolean;
|
|
101
109
|
}
|
|
@@ -113,7 +121,9 @@ export class StackSegmentConstructed extends SegmentConstructed {
|
|
|
113
121
|
|
|
114
122
|
this.name = props.stack.stackName;
|
|
115
123
|
|
|
116
|
-
const buildArtifact = props.project
|
|
124
|
+
const buildArtifact = props.project
|
|
125
|
+
? props.buildOutput || new Artifact()
|
|
126
|
+
: undefined;
|
|
117
127
|
|
|
118
128
|
this.actions = [
|
|
119
129
|
...(buildArtifact
|
|
@@ -184,11 +194,11 @@ export class StackSegmentConstructed extends SegmentConstructed {
|
|
|
184
194
|
account: props.stack.account,
|
|
185
195
|
region: props.stack.region,
|
|
186
196
|
changeSetName: `${props.stack.stackName}Changes`,
|
|
187
|
-
output: props.
|
|
197
|
+
output: props.stackOutput,
|
|
188
198
|
outputFileName: props.outputFileName
|
|
189
199
|
? props.outputFileName
|
|
190
|
-
: props.
|
|
191
|
-
?
|
|
200
|
+
: props.stackOutput
|
|
201
|
+
? "artifact.json"
|
|
192
202
|
: undefined,
|
|
193
203
|
}),
|
|
194
204
|
];
|