feat(ecs): Add support for enableExecuteCommand
MODIFY
clouddriver-ecs/src/main/java/com/netflix/spinnaker/clouddriver/ecs/deploy/description/CreateServerGroupDescription.java
clouddriver-ecs/src/main/java/com/netflix/spinnaker/clouddriver/ecs/deploy/description/CreateServerGroupDescription.java
@@ -98,6 +98,7 @@ public class CreateServerGroupDescription extends AbstractECSDescription {
Map<Object, Object> spelProcessedTaskDefinitionArtifact;
String taskDefinitionArtifactAccount;
Map<String, String> containerToImageMap;
+ boolean enableExecuteCommand;
/**
* @deprecated this field only allows for one container to be specified. ECS supports the ability

MODIFY
clouddriver-ecs/src/main/java/com/netflix/spinnaker/clouddriver/ecs/deploy/ops/CreateServerGroupAtomicOperation.java
clouddriver-ecs/src/main/java/com/netflix/spinnaker/clouddriver/ecs/deploy/ops/CreateServerGroupAtomicOperation.java
@@ -545,7 +545,8 @@ public class CreateServerGroupAtomicOperation
.withPlacementConstraints(description.getPlacementConstraints())
.withPlacementStrategy(description.getPlacementStrategySequence())
.withServiceRegistries(serviceRegistries)
- .withDeploymentConfiguration(deploymentConfiguration);
+ .withDeploymentConfiguration(deploymentConfiguration)
+ .withEnableExecuteCommand(description.isEnableExecuteCommand());
List<Tag> taskDefTags = new LinkedList<>();
if (description.getTags() != null && !description.getTags().isEmpty()) {

MODIFY
clouddriver-ecs/src/test/groovy/com/netflix/spinnaker/clouddriver/ecs/deploy/ops/CreateServerGroupAtomicOperationSpec.groovy
clouddriver-ecs/src/test/groovy/com/netflix/spinnaker/clouddriver/ecs/deploy/ops/CreateServerGroupAtomicOperationSpec.groovy
@@ -179,6 +179,7 @@ class CreateServerGroupAtomicOperationSpec extends CommonAtomicOperation {
request.tags.get(1).value == 'tomato'
request.launchType == null
request.platformVersion == null
+ request.enableExecuteCommand == false
}) >> new CreateServiceResult().withService(service)
result.getServerGroupNames().size() == 1
@@ -244,7 +245,8 @@ class CreateServerGroupAtomicOperationSpec extends CommonAtomicOperation {
subnetType: 'public',
securityGroupNames: ['helloworld'],
associatePublicIpAddress: true,
- serviceDiscoveryAssociations: [serviceRegistry]
+ serviceDiscoveryAssociations: [serviceRegistry],
+ enableExecuteCommand: true
)
def operation = new CreateServerGroupAtomicOperation(description)
@@ -308,6 +310,7 @@ class CreateServerGroupAtomicOperationSpec extends CommonAtomicOperation {
request.tags == []
request.launchType == 'FARGATE'
request.platformVersion == '1.0.0'
+ request.enableExecuteCommand == true
} as CreateServiceRequest) >> new CreateServiceResult().withService(service)
result.getServerGroupNames().size() == 1

feat(ecs): Add support for enableExecuteCommand (#5378)