@@ -182,7 +182,8 @@ describe('Deploy to ECS', () => {
182182 cluster : 'cluster-789' ,
183183 service : 'service-456' ,
184184 taskDefinition : 'task:def:arn' ,
185- forceNewDeployment : false
185+ forceNewDeployment : false ,
186+ enableECSManagedTags : false
186187 } ) ;
187188 expect ( waitUntilServicesStable ) . toHaveBeenCalledTimes ( 0 ) ;
188189 expect ( core . info ) . toBeCalledWith ( "Deployment started. Watch this deployment's progress in the Amazon ECS console: https://fake-region.console.aws.amazon.com/ecs/v2/clusters/cluster-789/services/service-456/events?region=fake-region" ) ;
@@ -213,7 +214,8 @@ describe('Deploy to ECS', () => {
213214 cluster : 'cluster-789' ,
214215 service : 'service-456' ,
215216 taskDefinition : 'task:def:arn' ,
216- forceNewDeployment : false
217+ forceNewDeployment : false ,
218+ enableECSManagedTags : false
217219 } ) ;
218220 expect ( waitUntilServicesStable ) . toHaveBeenCalledTimes ( 0 ) ;
219221 expect ( core . info ) . toBeCalledWith ( "Deployment started. Watch this deployment's progress in the Amazon ECS console: https://fake-region.console.aws.amazon.com/ecs/v2/clusters/cluster-789/services/service-456/events?region=fake-region" ) ;
@@ -708,6 +710,7 @@ describe('Deploy to ECS', () => {
708710 . mockReturnValueOnce ( '' ) // force-new-deployment
709711 . mockReturnValueOnce ( '' ) // run-task
710712 . mockReturnValueOnce ( '' ) // desired count
713+ . mockReturnValueOnce ( '' ) // enable-ecs-managed-tags
711714 . mockReturnValueOnce ( '/hello/appspec.json' ) // codedeploy-appspec
712715 . mockReturnValueOnce ( 'MyApplication' ) // codedeploy-application
713716 . mockReturnValueOnce ( 'MyDeploymentGroup' ) ; // codedeploy-deployment-group
@@ -944,7 +947,8 @@ describe('Deploy to ECS', () => {
944947 cluster : 'cluster-789' ,
945948 service : 'service-456' ,
946949 taskDefinition : 'task:def:arn' ,
947- forceNewDeployment : false
950+ forceNewDeployment : false ,
951+ enableECSManagedTags : false
948952 } ) ;
949953 expect ( waitUntilServicesStable ) . toHaveBeenNthCalledWith (
950954 1 ,
@@ -983,7 +987,8 @@ describe('Deploy to ECS', () => {
983987 cluster : 'cluster-789' ,
984988 service : 'service-456' ,
985989 taskDefinition : 'task:def:arn' ,
986- forceNewDeployment : false
990+ forceNewDeployment : false ,
991+ enableECSManagedTags : false
987992 } ) ;
988993 expect ( waitUntilServicesStable ) . toHaveBeenNthCalledWith (
989994 1 ,
@@ -1022,7 +1027,8 @@ describe('Deploy to ECS', () => {
10221027 cluster : 'cluster-789' ,
10231028 service : 'service-456' ,
10241029 taskDefinition : 'task:def:arn' ,
1025- forceNewDeployment : false
1030+ forceNewDeployment : false ,
1031+ enableECSManagedTags : false
10261032 } ) ;
10271033 expect ( waitUntilServicesStable ) . toHaveBeenNthCalledWith (
10281034 1 ,
@@ -1063,7 +1069,8 @@ describe('Deploy to ECS', () => {
10631069 desiredCount : 4 ,
10641070 service : 'service-456' ,
10651071 taskDefinition : 'task:def:arn' ,
1066- forceNewDeployment : true
1072+ forceNewDeployment : true ,
1073+ enableECSManagedTags : false
10671074 } ) ;
10681075 } ) ;
10691076
@@ -1087,7 +1094,8 @@ describe('Deploy to ECS', () => {
10871094 cluster : 'default' ,
10881095 service : 'service-456' ,
10891096 taskDefinition : 'task:def:arn' ,
1090- forceNewDeployment : false
1097+ forceNewDeployment : false ,
1098+ enableECSManagedTags : false
10911099 } ) ;
10921100 } ) ;
10931101
@@ -1113,6 +1121,7 @@ describe('Deploy to ECS', () => {
11131121 . mockReturnValueOnce ( '' ) // cluster
11141122 . mockReturnValueOnce ( '' ) // wait-for-service-stability
11151123 . mockReturnValueOnce ( '' ) // wait-for-minutes
1124+ . mockReturnValueOnce ( '' ) // enable-ecs-managed-tags
11161125 . mockReturnValueOnce ( '' ) // force-new-deployment
11171126 . mockReturnValueOnce ( '' ) // desired-count
11181127 . mockReturnValueOnce ( 'true' ) ; // run-task
@@ -1129,7 +1138,8 @@ describe('Deploy to ECS', () => {
11291138 launchType : 'FARGATE' ,
11301139 taskDefinition : 'task:def:arn' ,
11311140 overrides : { "containerOverrides" : [ ] } ,
1132- networkConfiguration : null
1141+ networkConfiguration : null ,
1142+ enableECSManagedTags : false
11331143 } ) ;
11341144
11351145 expect ( core . setOutput ) . toHaveBeenNthCalledWith ( 2 , 'run-task-arn' , [ "arn:aws:ecs:fake-region:account_id:task/arn" ] ) ;
@@ -1145,6 +1155,7 @@ describe('Deploy to ECS', () => {
11451155 . mockReturnValueOnce ( '' ) // wait-for-minutes
11461156 . mockReturnValueOnce ( '' ) // force-new-deployment
11471157 . mockReturnValueOnce ( '' ) // desired-count
1158+ . mockReturnValueOnce ( 'true' ) // enable-ecs-managed-tags
11481159 . mockReturnValueOnce ( 'true' ) // run-task
11491160 . mockReturnValueOnce ( 'false' ) // wait-for-task-stopped
11501161 . mockReturnValueOnce ( 'someJoe' ) // run-task-started-by
@@ -1164,7 +1175,8 @@ describe('Deploy to ECS', () => {
11641175 launchType : 'EC2' ,
11651176 taskDefinition : 'task:def:arn' ,
11661177 overrides : { containerOverrides : [ { name : 'someapp' , command : 'somecmd' } ] } ,
1167- networkConfiguration : { awsvpcConfiguration : { subnets : [ 'a' , 'b' ] , securityGroups : [ 'c' , 'd' ] , assignPublicIp : "DISABLED" } }
1178+ networkConfiguration : { awsvpcConfiguration : { subnets : [ 'a' , 'b' ] , securityGroups : [ 'c' , 'd' ] , assignPublicIp : "DISABLED" } } ,
1179+ enableECSManagedTags : true
11681180 } ) ;
11691181 expect ( core . setOutput ) . toHaveBeenNthCalledWith ( 2 , 'run-task-arn' , [ "arn:aws:ecs:fake-region:account_id:task/arn" ] ) ;
11701182 } ) ;
@@ -1177,8 +1189,9 @@ describe('Deploy to ECS', () => {
11771189 . mockReturnValueOnce ( 'somecluster' ) // cluster
11781190 . mockReturnValueOnce ( 'true' ) // wait-for-service-stability
11791191 . mockReturnValueOnce ( '' ) // wait-for-minutes
1180- . mockReturnValueOnce ( '' ) // force-new-deployment
1192+ . mockReturnValueOnce ( '' ) // force-new-deployment
11811193 . mockReturnValueOnce ( '' ) // desired-count
1194+ . mockReturnValueOnce ( '' ) // enable-ecs-managed-tags
11821195 . mockReturnValueOnce ( 'true' ) // run-task
11831196 . mockReturnValueOnce ( 'false' ) // wait-for-task-stopped
11841197 . mockReturnValueOnce ( 'someJoe' ) // run-task-started-by
@@ -1200,15 +1213,17 @@ describe('Deploy to ECS', () => {
12001213 cluster : 'somecluster' ,
12011214 service : 'service-456' ,
12021215 taskDefinition : 'task:def:arn' ,
1203- forceNewDeployment : false
1216+ forceNewDeployment : false ,
1217+ enableECSManagedTags : false
12041218 } ) ;
12051219 expect ( mockRunTask ) . toHaveBeenCalledWith ( {
12061220 startedBy : 'someJoe' ,
12071221 cluster : 'somecluster' ,
12081222 taskDefinition : 'task:def:arn' ,
12091223 launchType : 'EC2' ,
12101224 overrides : { containerOverrides : [ { name : 'someapp' , command : 'somecmd' } ] } ,
1211- networkConfiguration : { awsvpcConfiguration : { subnets : [ 'a' , 'b' ] , securityGroups : [ 'c' , 'd' ] , assignPublicIp : "DISABLED" } }
1225+ networkConfiguration : { awsvpcConfiguration : { subnets : [ 'a' , 'b' ] , securityGroups : [ 'c' , 'd' ] , assignPublicIp : "DISABLED" } } ,
1226+ enableECSManagedTags : false
12121227 } ) ;
12131228 expect ( core . setOutput ) . toHaveBeenNthCalledWith ( 2 , 'run-task-arn' , [ "arn:aws:ecs:fake-region:account_id:task/arn" ] ) ;
12141229 } ) ;
@@ -1223,6 +1238,7 @@ describe('Deploy to ECS', () => {
12231238 . mockReturnValueOnce ( '' ) // wait-for-minutes
12241239 . mockReturnValueOnce ( '' ) // force-new-deployment
12251240 . mockReturnValueOnce ( '' ) // desired-count
1241+ . mockReturnValueOnce ( '' ) // enable-ecs-managed-tags
12261242 . mockReturnValueOnce ( 'true' ) // run-task
12271243 . mockReturnValueOnce ( 'true' ) ; // wait-for-task-stopped
12281244
@@ -1244,6 +1260,7 @@ describe('Deploy to ECS', () => {
12441260 . mockReturnValueOnce ( 'somecluster' ) // cluster
12451261 . mockReturnValueOnce ( 'true' ) // wait-for-service-stability
12461262 . mockReturnValueOnce ( '' ) // wait-for-minutes
1263+ . mockReturnValueOnce ( '' ) // enable-ecs-managed-tags
12471264 . mockReturnValueOnce ( '' ) // force-new-deployment
12481265 . mockReturnValueOnce ( '' ) // desired-count
12491266 . mockReturnValueOnce ( 'true' ) // run-task
@@ -1262,7 +1279,8 @@ describe('Deploy to ECS', () => {
12621279 taskDefinition : 'task:def:arn' ,
12631280 launchType : 'EC2' ,
12641281 overrides : { containerOverrides : [ ] } ,
1265- networkConfiguration : null
1282+ networkConfiguration : null ,
1283+ enableECSManagedTags : false
12661284 } ) ;
12671285 } ) ;
12681286
@@ -1317,8 +1335,9 @@ describe('Deploy to ECS', () => {
13171335 . mockReturnValueOnce ( '' ) // wait-for-minutes
13181336 . mockReturnValueOnce ( '' ) // force-new-deployment
13191337 . mockReturnValueOnce ( '' ) // desired-count
1338+ . mockReturnValueOnce ( '' ) // enable-ecs-managed-tags
13201339 . mockReturnValueOnce ( 'true' ) // run-task
1321- . mockReturnValueOnce ( 'false' ) ; // wait-for-task-stopped
1340+ . mockReturnValueOnce ( 'false' ) ; // wait-for-task-stopped
13221341
13231342 mockRunTask . mockImplementation (
13241343 ( ) => Promise . resolve ( {
@@ -1427,4 +1446,4 @@ describe('Deploy to ECS', () => {
14271446 expect ( core . setFailed ) . toHaveBeenNthCalledWith ( 1 , 'Failed to register task definition in ECS: Could not parse' ) ;
14281447 expect ( core . setFailed ) . toHaveBeenNthCalledWith ( 2 , 'Could not parse' ) ;
14291448 } ) ;
1430- } ) ;
1449+ } ) ;
0 commit comments