@flit/cdk-pipeline 2.5.2 → 2.5.3
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 +2 -259
- package/dist/artifact.js +1 -1
- package/dist/code-commit-source-segment.js +2 -2
- package/dist/code-star-source-segment.js +2 -2
- package/dist/git-hub-source-segment.js +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -2
- package/dist/pipeline-segment.js +4 -4
- package/dist/pipeline.js +1 -1
- package/dist/s3-source-segment.js +2 -2
- package/dist/segment.js +2 -2
- package/dist/source-segment.js +1 -1
- package/dist/stack-segment.js +4 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/index.ts +0 -1
- package/src/pipeline-segment.ts +1 -1
- package/src/stack-segment.ts +1 -1
- package/src/publish-assets-action.ts +0 -123
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -4,7 +4,6 @@ export * from "./code-star-source-segment";
|
|
|
4
4
|
export * from "./git-hub-source-segment";
|
|
5
5
|
export * from "./pipeline-segment";
|
|
6
6
|
export * from "./pipeline";
|
|
7
|
-
export * from "./publish-assets-action";
|
|
8
7
|
export * from "./s3-source-segment";
|
|
9
8
|
export * from "./segment";
|
|
10
9
|
export * from "./source-segment";
|
package/src/pipeline-segment.ts
CHANGED
|
@@ -114,7 +114,7 @@ export class PipelineSegmentConstructed extends SegmentConstructed {
|
|
|
114
114
|
commands: "npm install -g aws-cdk",
|
|
115
115
|
},
|
|
116
116
|
build: {
|
|
117
|
-
commands: `npx cdk deploy ${props.stack.node.id} --app ./ --method prepare-change-set --change-set-name pipeline-${props.stack.node.id}-${this.name} --require-approval never`,
|
|
117
|
+
commands: `npx cdk deploy ${props.stack.node.id} --app ./ --exclusively --method prepare-change-set --change-set-name pipeline-${props.stack.node.id}-${this.name} --require-approval never`,
|
|
118
118
|
},
|
|
119
119
|
},
|
|
120
120
|
cache: {
|
package/src/stack-segment.ts
CHANGED
|
@@ -191,7 +191,7 @@ export class StackSegmentConstructed extends SegmentConstructed {
|
|
|
191
191
|
commands: "npm install -g aws-cdk",
|
|
192
192
|
},
|
|
193
193
|
build: {
|
|
194
|
-
commands: `npx cdk deploy ${props.stack.node.id} --app ./ --method prepare-change-set --change-set-name pipeline-${props.stack.node.id}-${this.name} --require-approval never`,
|
|
194
|
+
commands: `npx cdk deploy ${props.stack.node.id} --app ./ --exclusively --method prepare-change-set --change-set-name pipeline-${props.stack.node.id}-${this.name} --require-approval never`,
|
|
195
195
|
},
|
|
196
196
|
},
|
|
197
197
|
cache: {
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { Stack } from "aws-cdk-lib";
|
|
2
|
-
import { Construct } from "constructs";
|
|
3
|
-
import {
|
|
4
|
-
ActionBindOptions,
|
|
5
|
-
ActionConfig,
|
|
6
|
-
ActionProperties,
|
|
7
|
-
Artifact,
|
|
8
|
-
IAction,
|
|
9
|
-
IStage,
|
|
10
|
-
} from "aws-cdk-lib/aws-codepipeline";
|
|
11
|
-
import { BuildSpec, LinuxBuildImage, Project } from "aws-cdk-lib/aws-codebuild";
|
|
12
|
-
import { CodeBuildAction } from "aws-cdk-lib/aws-codepipeline-actions";
|
|
13
|
-
import {
|
|
14
|
-
AccountPrincipal,
|
|
15
|
-
CompositePrincipal,
|
|
16
|
-
PolicyDocument,
|
|
17
|
-
PolicyStatement,
|
|
18
|
-
Role,
|
|
19
|
-
ServicePrincipal,
|
|
20
|
-
} from "aws-cdk-lib/aws-iam";
|
|
21
|
-
import { IRuleTarget, RuleProps, Rule } from "aws-cdk-lib/aws-events";
|
|
22
|
-
import * as path from "path";
|
|
23
|
-
|
|
24
|
-
export interface PublishAssetsActionProps {
|
|
25
|
-
readonly actionName: string;
|
|
26
|
-
readonly input: Artifact;
|
|
27
|
-
readonly manifestPath: string;
|
|
28
|
-
readonly runOrder?: number;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export class PublishAssetsAction extends Construct implements IAction {
|
|
32
|
-
public readonly actionProperties: ActionProperties;
|
|
33
|
-
|
|
34
|
-
bound(
|
|
35
|
-
scope: Construct,
|
|
36
|
-
stage: IStage,
|
|
37
|
-
options: ActionBindOptions,
|
|
38
|
-
): ActionConfig {
|
|
39
|
-
throw new Error(`Method not implemented.${!scope && !stage! && options}`);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
bind(
|
|
43
|
-
scope: Construct,
|
|
44
|
-
stage: IStage,
|
|
45
|
-
options: ActionBindOptions,
|
|
46
|
-
): ActionConfig {
|
|
47
|
-
throw new Error(`Method not implemented.${!scope && !stage! && options}`);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
onStateChange(
|
|
51
|
-
name: string,
|
|
52
|
-
target?: IRuleTarget | undefined,
|
|
53
|
-
options?: RuleProps | undefined,
|
|
54
|
-
): Rule {
|
|
55
|
-
throw new Error(`Method not implemented.${!name && !target! && options}`);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
constructor(scope: Construct, id: string, props: PublishAssetsActionProps) {
|
|
59
|
-
super(scope, id);
|
|
60
|
-
const codeBuild = new CodeBuildAction({
|
|
61
|
-
...props,
|
|
62
|
-
input: props.input,
|
|
63
|
-
project: new Project(this, id, {
|
|
64
|
-
environment: {
|
|
65
|
-
buildImage: LinuxBuildImage.AMAZON_LINUX_2_5,
|
|
66
|
-
},
|
|
67
|
-
role: new Role(this, "UpdatePipelineCodeCuildRole", {
|
|
68
|
-
assumedBy: new CompositePrincipal(
|
|
69
|
-
new ServicePrincipal("codebuild.amazonaws.com"),
|
|
70
|
-
new AccountPrincipal(Stack.of(this).account),
|
|
71
|
-
),
|
|
72
|
-
inlinePolicies: {
|
|
73
|
-
selfMutation: new PolicyDocument({
|
|
74
|
-
statements: [
|
|
75
|
-
new PolicyStatement({
|
|
76
|
-
actions: ["sts:AssumeRole"],
|
|
77
|
-
resources: [`arn:*:iam::${Stack.of(this).account}:role/*`],
|
|
78
|
-
conditions: {
|
|
79
|
-
"ForAnyValue:StringEquals": {
|
|
80
|
-
"iam:ResourceTag/aws-cdk:bootstrap-role": [
|
|
81
|
-
"image-publishing",
|
|
82
|
-
"file-publishing",
|
|
83
|
-
"deploy",
|
|
84
|
-
],
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
}),
|
|
88
|
-
],
|
|
89
|
-
}),
|
|
90
|
-
},
|
|
91
|
-
}),
|
|
92
|
-
buildSpec: BuildSpec.fromObject({
|
|
93
|
-
version: "0.2",
|
|
94
|
-
phases: {
|
|
95
|
-
install: {
|
|
96
|
-
"runtime-versions": {
|
|
97
|
-
nodejs: "latest",
|
|
98
|
-
},
|
|
99
|
-
commands: ["npm i -g @flit/publish-cdk-assets@latest"],
|
|
100
|
-
},
|
|
101
|
-
build: {
|
|
102
|
-
commands: `pca ${
|
|
103
|
-
props.manifestPath ? path.normalize(props.manifestPath) : "."
|
|
104
|
-
}`,
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
}),
|
|
108
|
-
}),
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
this.actionProperties = codeBuild.actionProperties;
|
|
112
|
-
this.bind = (
|
|
113
|
-
scope: Construct,
|
|
114
|
-
stage: IStage,
|
|
115
|
-
options: ActionBindOptions,
|
|
116
|
-
): ActionConfig => codeBuild.bind(scope, stage, options);
|
|
117
|
-
this.onStateChange = (
|
|
118
|
-
name: string,
|
|
119
|
-
target?: IRuleTarget,
|
|
120
|
-
options?: RuleProps,
|
|
121
|
-
): Rule => codeBuild.onStateChange(name, target, options);
|
|
122
|
-
}
|
|
123
|
-
}
|