Skip to content

Commit 67393b6

Browse files
authored
feat: add new parameters and tests to one-off task feature (#593)
* je ne sais pas * Create testing.json * Create aws.yml * new files that i created for the ecs cluster,service and task * Update aws.yml * Update aws.yml * Update aws.yml * Update aws.yml * Delete testing.json * Delete .github/workflows/aws.yml * implemented unit tests * "Added support for creating individual clusters for tasks and services, updated runTask and updateEcsService functions to use new cluster names, and modified tests to accommodate new cluster creation" * "Refactor ECS deployment code: updated input handling, removed create cluster command, added capacity provider strategy, and modified tests" * "Updated action.yml, index.js, and index.test.js files with changes to capacity provider strategy, task definition, and ECS service updates." * updated action.yml by removing comments * added inputs to action.yml for capacity provider * added solid inputs in the capacity provider for action.yml * fixed order of capacity provider order inputs in action.yml file * changed capacity provider description to double quotes and shortend it * removed spacing from list in capacity provider in action.yml file * fixing the spacing and list of capacity provider in action.yml file * fixing spacing on capacity provider of action.yml file * deleted list line in capacity provider of action.yml file * Delete .idea/aws.xml * Delete .idea/inspectionProfiles/Project_Default.xml * Delete .idea/misc.xml * Delete .idea/vcs.xml * Delete .idea/workspace.xml * "Removed capacityProviderStrategy from function parameters and implementations in index.js and index.test.js" * Updated the code with no capacity provider * removed capacity provider option from action.yml * updated action.yml file with commentary on new and original inputs * "Added support for running ECS tasks outside of a service, updated ECS service update logic, and made minor changes to CodeDeploy deployment description and task exit code handling." * spacing * updating dist file after modifying index.js file * Added tests to check when a task fails whne it tries to stop and when a service proceeds that failed task * Testing default options in run task unit test * added assign public IP input and settings * fixing action.yml file line 57 error * fixing additional comments from reviewers * updating aws sdk version * updated running task link to ECS * updated running task link to ECS and read me file * updated run task description in action.yml for clearer usage of feature * updated run task description in action.yml * delete sdk version 2 * final changes from comments * cleaning up code and organzie * new changes, removing spaces and correcting indentation * fixing indentation * fixing indentation part 2 * changes to testing errors * changes to new test
1 parent b3a528e commit 67393b6

File tree

7 files changed

+8132
-6674
lines changed

7 files changed

+8132
-6674
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Registers an Amazon ECS task definition and deploys it to an ECS service.
3131
```
3232
3333
See [action.yml](action.yml) for the full documentation for this action's inputs and outputs.
34+
In most cases when running a one-off task, subnet ID's, subnet groups, and assign public IP will be required.
3435
3536
### Task definition file
3637

action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ inputs:
4141
description: 'Whether to force a new deployment of the service. Valid value is "true". Will default to not force a new deployment.'
4242
required: false
4343
run-task:
44-
description: 'Whether to run the task outside of an ECS service. Task will run before the service is updated if both are provided. Will default to not run.'
44+
description: 'A boolean indicating whether to run a stand-alone task in a ECS cluster. Task will run before the service is updated if both are provided. Default value is false .'
4545
required: false
4646
run-task-container-overrides:
4747
description: 'A JSON array of container override objects which should applied when running a task outside of a service. Warning: Do not expose this field to untrusted inputs. More details: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerOverride.html'
@@ -52,6 +52,9 @@ inputs:
5252
run-task-subnets:
5353
description: 'A comma-separated list of subnet IDs to assign to a task when run outside of a service. Will default to none.'
5454
required: false
55+
run-task-assign-public-IP:
56+
description: "Whether the task's elastic network interface receives a public IP address. The default value is DISABLED."
57+
required: false
5558
run-task-launch-type:
5659
description: "ECS launch type for tasks run outside of a service. Valid values are 'FARGATE' or 'EC2'. Will default to 'FARGATE'."
5760
required: false

0 commit comments

Comments
 (0)