@@ -182,7 +182,8 @@ describe('Deploy to ECS', () => {
182
182
cluster : 'cluster-789' ,
183
183
service : 'service-456' ,
184
184
taskDefinition : 'task:def:arn' ,
185
- forceNewDeployment : false
185
+ forceNewDeployment : false ,
186
+ enableECSManagedTags : false
186
187
} ) ;
187
188
expect ( waitUntilServicesStable ) . toHaveBeenCalledTimes ( 0 ) ;
188
189
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', () => {
213
214
cluster : 'cluster-789' ,
214
215
service : 'service-456' ,
215
216
taskDefinition : 'task:def:arn' ,
216
- forceNewDeployment : false
217
+ forceNewDeployment : false ,
218
+ enableECSManagedTags : false
217
219
} ) ;
218
220
expect ( waitUntilServicesStable ) . toHaveBeenCalledTimes ( 0 ) ;
219
221
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', () => {
708
710
. mockReturnValueOnce ( '' ) // force-new-deployment
709
711
. mockReturnValueOnce ( '' ) // run-task
710
712
. mockReturnValueOnce ( '' ) // desired count
713
+ . mockReturnValueOnce ( '' ) // enable-ecs-managed-tags
711
714
. mockReturnValueOnce ( '/hello/appspec.json' ) // codedeploy-appspec
712
715
. mockReturnValueOnce ( 'MyApplication' ) // codedeploy-application
713
716
. mockReturnValueOnce ( 'MyDeploymentGroup' ) ; // codedeploy-deployment-group
@@ -944,7 +947,8 @@ describe('Deploy to ECS', () => {
944
947
cluster : 'cluster-789' ,
945
948
service : 'service-456' ,
946
949
taskDefinition : 'task:def:arn' ,
947
- forceNewDeployment : false
950
+ forceNewDeployment : false ,
951
+ enableECSManagedTags : false
948
952
} ) ;
949
953
expect ( waitUntilServicesStable ) . toHaveBeenNthCalledWith (
950
954
1 ,
@@ -983,7 +987,8 @@ describe('Deploy to ECS', () => {
983
987
cluster : 'cluster-789' ,
984
988
service : 'service-456' ,
985
989
taskDefinition : 'task:def:arn' ,
986
- forceNewDeployment : false
990
+ forceNewDeployment : false ,
991
+ enableECSManagedTags : false
987
992
} ) ;
988
993
expect ( waitUntilServicesStable ) . toHaveBeenNthCalledWith (
989
994
1 ,
@@ -1022,7 +1027,8 @@ describe('Deploy to ECS', () => {
1022
1027
cluster : 'cluster-789' ,
1023
1028
service : 'service-456' ,
1024
1029
taskDefinition : 'task:def:arn' ,
1025
- forceNewDeployment : false
1030
+ forceNewDeployment : false ,
1031
+ enableECSManagedTags : false
1026
1032
} ) ;
1027
1033
expect ( waitUntilServicesStable ) . toHaveBeenNthCalledWith (
1028
1034
1 ,
@@ -1063,7 +1069,8 @@ describe('Deploy to ECS', () => {
1063
1069
desiredCount : 4 ,
1064
1070
service : 'service-456' ,
1065
1071
taskDefinition : 'task:def:arn' ,
1066
- forceNewDeployment : true
1072
+ forceNewDeployment : true ,
1073
+ enableECSManagedTags : false
1067
1074
} ) ;
1068
1075
} ) ;
1069
1076
@@ -1087,7 +1094,8 @@ describe('Deploy to ECS', () => {
1087
1094
cluster : 'default' ,
1088
1095
service : 'service-456' ,
1089
1096
taskDefinition : 'task:def:arn' ,
1090
- forceNewDeployment : false
1097
+ forceNewDeployment : false ,
1098
+ enableECSManagedTags : false
1091
1099
} ) ;
1092
1100
} ) ;
1093
1101
@@ -1113,6 +1121,7 @@ describe('Deploy to ECS', () => {
1113
1121
. mockReturnValueOnce ( '' ) // cluster
1114
1122
. mockReturnValueOnce ( '' ) // wait-for-service-stability
1115
1123
. mockReturnValueOnce ( '' ) // wait-for-minutes
1124
+ . mockReturnValueOnce ( '' ) // enable-ecs-managed-tags
1116
1125
. mockReturnValueOnce ( '' ) // force-new-deployment
1117
1126
. mockReturnValueOnce ( '' ) // desired-count
1118
1127
. mockReturnValueOnce ( 'true' ) ; // run-task
@@ -1129,7 +1138,8 @@ describe('Deploy to ECS', () => {
1129
1138
launchType : 'FARGATE' ,
1130
1139
taskDefinition : 'task:def:arn' ,
1131
1140
overrides : { "containerOverrides" : [ ] } ,
1132
- networkConfiguration : null
1141
+ networkConfiguration : null ,
1142
+ enableECSManagedTags : false
1133
1143
} ) ;
1134
1144
1135
1145
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', () => {
1145
1155
. mockReturnValueOnce ( '' ) // wait-for-minutes
1146
1156
. mockReturnValueOnce ( '' ) // force-new-deployment
1147
1157
. mockReturnValueOnce ( '' ) // desired-count
1158
+ . mockReturnValueOnce ( 'true' ) // enable-ecs-managed-tags
1148
1159
. mockReturnValueOnce ( 'true' ) // run-task
1149
1160
. mockReturnValueOnce ( 'false' ) // wait-for-task-stopped
1150
1161
. mockReturnValueOnce ( 'someJoe' ) // run-task-started-by
@@ -1164,7 +1175,8 @@ describe('Deploy to ECS', () => {
1164
1175
launchType : 'EC2' ,
1165
1176
taskDefinition : 'task:def:arn' ,
1166
1177
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
1168
1180
} ) ;
1169
1181
expect ( core . setOutput ) . toHaveBeenNthCalledWith ( 2 , 'run-task-arn' , [ "arn:aws:ecs:fake-region:account_id:task/arn" ] ) ;
1170
1182
} ) ;
@@ -1177,8 +1189,9 @@ describe('Deploy to ECS', () => {
1177
1189
. mockReturnValueOnce ( 'somecluster' ) // cluster
1178
1190
. mockReturnValueOnce ( 'true' ) // wait-for-service-stability
1179
1191
. mockReturnValueOnce ( '' ) // wait-for-minutes
1180
- . mockReturnValueOnce ( '' ) // force-new-deployment
1192
+ . mockReturnValueOnce ( '' ) // force-new-deployment
1181
1193
. mockReturnValueOnce ( '' ) // desired-count
1194
+ . mockReturnValueOnce ( '' ) // enable-ecs-managed-tags
1182
1195
. mockReturnValueOnce ( 'true' ) // run-task
1183
1196
. mockReturnValueOnce ( 'false' ) // wait-for-task-stopped
1184
1197
. mockReturnValueOnce ( 'someJoe' ) // run-task-started-by
@@ -1200,15 +1213,17 @@ describe('Deploy to ECS', () => {
1200
1213
cluster : 'somecluster' ,
1201
1214
service : 'service-456' ,
1202
1215
taskDefinition : 'task:def:arn' ,
1203
- forceNewDeployment : false
1216
+ forceNewDeployment : false ,
1217
+ enableECSManagedTags : false
1204
1218
} ) ;
1205
1219
expect ( mockRunTask ) . toHaveBeenCalledWith ( {
1206
1220
startedBy : 'someJoe' ,
1207
1221
cluster : 'somecluster' ,
1208
1222
taskDefinition : 'task:def:arn' ,
1209
1223
launchType : 'EC2' ,
1210
1224
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
1212
1227
} ) ;
1213
1228
expect ( core . setOutput ) . toHaveBeenNthCalledWith ( 2 , 'run-task-arn' , [ "arn:aws:ecs:fake-region:account_id:task/arn" ] ) ;
1214
1229
} ) ;
@@ -1223,6 +1238,7 @@ describe('Deploy to ECS', () => {
1223
1238
. mockReturnValueOnce ( '' ) // wait-for-minutes
1224
1239
. mockReturnValueOnce ( '' ) // force-new-deployment
1225
1240
. mockReturnValueOnce ( '' ) // desired-count
1241
+ . mockReturnValueOnce ( '' ) // enable-ecs-managed-tags
1226
1242
. mockReturnValueOnce ( 'true' ) // run-task
1227
1243
. mockReturnValueOnce ( 'true' ) ; // wait-for-task-stopped
1228
1244
@@ -1244,6 +1260,7 @@ describe('Deploy to ECS', () => {
1244
1260
. mockReturnValueOnce ( 'somecluster' ) // cluster
1245
1261
. mockReturnValueOnce ( 'true' ) // wait-for-service-stability
1246
1262
. mockReturnValueOnce ( '' ) // wait-for-minutes
1263
+ . mockReturnValueOnce ( '' ) // enable-ecs-managed-tags
1247
1264
. mockReturnValueOnce ( '' ) // force-new-deployment
1248
1265
. mockReturnValueOnce ( '' ) // desired-count
1249
1266
. mockReturnValueOnce ( 'true' ) // run-task
@@ -1262,7 +1279,8 @@ describe('Deploy to ECS', () => {
1262
1279
taskDefinition : 'task:def:arn' ,
1263
1280
launchType : 'EC2' ,
1264
1281
overrides : { containerOverrides : [ ] } ,
1265
- networkConfiguration : null
1282
+ networkConfiguration : null ,
1283
+ enableECSManagedTags : false
1266
1284
} ) ;
1267
1285
} ) ;
1268
1286
@@ -1317,8 +1335,9 @@ describe('Deploy to ECS', () => {
1317
1335
. mockReturnValueOnce ( '' ) // wait-for-minutes
1318
1336
. mockReturnValueOnce ( '' ) // force-new-deployment
1319
1337
. mockReturnValueOnce ( '' ) // desired-count
1338
+ . mockReturnValueOnce ( '' ) // enable-ecs-managed-tags
1320
1339
. mockReturnValueOnce ( 'true' ) // run-task
1321
- . mockReturnValueOnce ( 'false' ) ; // wait-for-task-stopped
1340
+ . mockReturnValueOnce ( 'false' ) ; // wait-for-task-stopped
1322
1341
1323
1342
mockRunTask . mockImplementation (
1324
1343
( ) => Promise . resolve ( {
@@ -1427,4 +1446,4 @@ describe('Deploy to ECS', () => {
1427
1446
expect ( core . setFailed ) . toHaveBeenNthCalledWith ( 1 , 'Failed to register task definition in ECS: Could not parse' ) ;
1428
1447
expect ( core . setFailed ) . toHaveBeenNthCalledWith ( 2 , 'Could not parse' ) ;
1429
1448
} ) ;
1430
- } ) ;
1449
+ } ) ;
0 commit comments