Skip to content

Commit f2293e0

Browse files
straxElad Ben-Israel
authored and
Elad Ben-Israel
committed
fix(codepipeline-actions): set service as backing resource for EcsDeployAction (#3085)
1 parent 64a203f commit f2293e0

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

packages/@aws-cdk/aws-codepipeline-actions/lib/ecs/deploy-action.ts

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export class EcsDeployAction extends Action {
5555
provider: 'ECS',
5656
artifactBounds: deployArtifactBounds(),
5757
inputs: [determineInputArtifact(props)],
58+
resource: props.service
5859
});
5960

6061
this.props = props;

packages/@aws-cdk/aws-codepipeline-actions/test/ecs/test.ecs-deploy-action.ts

+15
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,21 @@ export = {
6565

6666
test.done();
6767
},
68+
69+
"sets the target service as the action's backing resource"(test: Test) {
70+
const service = anyEcsService();
71+
const artifact = new codepipeline.Artifact('Artifact');
72+
73+
const action = new cpactions.EcsDeployAction({
74+
actionName: 'ECS',
75+
service,
76+
input: artifact
77+
});
78+
79+
test.equal(action.actionProperties.resource, service);
80+
81+
test.done();
82+
},
6883
},
6984
};
7085

0 commit comments

Comments
 (0)