-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(deploy): deploy workloads with entrypoint and command overrides #1999
Conversation
This PR implements the functionality to unify entrypoint and command, which can be either type string or type slice of strings, to type slice of strings. In CloudFormation template the fields "EntryPoint" and "Command" need to be of type list of strings ([see here](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinitions.html#cfn-ecs-taskdefinition-containerdefinition-entrypoint)). Given inputs of `entrypoint` and `command` from `manifest.yml`, which can be type string or type slice of strings, unifying their data types to slice of strings makes it easier to execute the data into CloudFormation templates. Usage of the function can be found [here in #1999](https://github.com/aws/copilot-cli/pull/1999/files#diff-ef96052956ce8fb054feb98cffccafb463a32941e692eb3164b89330fd9d9ab8). Preceding PR: #1976 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
81c5582
to
a1a1184
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me! nit: do we need unit test for those two new fields?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me too! +1 to PH's comment maybe we can add EntryPoint
and Command
to TestTemplate_ParseLoadBalancedWebService
in template_integration_test.go
I saw that in your PR #1997 you modified the tests by having individual I think in order to include entrypoint/command in the unit tests inside deploy/cfn/stack, I need to do the same thing. What do you think I include the tests after your PR gets merged? |
Sounds good to me! Would you mind to review it? Edit: Looks like it is about to be merged. But still feel free to leave any comment! |
@@ -179,6 +179,7 @@ type WorkloadOpts struct { | |||
Network *NetworkOpts | |||
EntryPoint []string | |||
Command []string | |||
DomainAlias string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for 🤔 Oh nvm it's because of the commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Ship it 🚢
This PR refactors the manifest setup in stack for backend svc tests. In addition, it adds entrypoint/command fields for backend svc and scheduled job (as a follow up on #1999). By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Adds docs on `entrypoint` and `command` fields in manifest files. Preceding PR: #1999 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This PR implements the functionality to unify entrypoint and command, which can be either type string or type slice of strings, to type slice of strings. In CloudFormation template the fields "EntryPoint" and "Command" need to be of type list of strings ([see here](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinitions.html#cfn-ecs-taskdefinition-containerdefinition-entrypoint)). Given inputs of `entrypoint` and `command` from `manifest.yml`, which can be type string or type slice of strings, unifying their data types to slice of strings makes it easier to execute the data into CloudFormation templates. Usage of the function can be found [here in aws#1999](https://github.com/aws/copilot-cli/pull/1999/files#diff-ef96052956ce8fb054feb98cffccafb463a32941e692eb3164b89330fd9d9ab8). Preceding PR: aws#1976 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This PR refactors the manifest setup in stack for backend svc tests. In addition, it adds entrypoint/command fields for backend svc and scheduled job (as a follow up on aws#1999). By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Adds docs on `entrypoint` and `command` fields in manifest files. Preceding PR: aws#1999 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This PR deploys workloads given entrypoint and command overrides read from
manifest.yml
.Preceding PR: #1998
Resolves #1950
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.