$ copilot job deploy
What does it do?
job deploy takes your local code and configuration and deploys your job.
The steps involved in
job deploy are:
- Build your local Dockerfile into an image
- Tag it with the value from
--tagor the latest git sha (if you're in a git directory)
- Push the image to ECR
- Package your manifest file and addons into CloudFormation
- Create / update your ECS task definition and job
What are the flags?
-a, --app string Name of the application. -e, --env string Name of the environment. -h, --help help for deploy -n, --name string Name of the job. --no-rollback bool Optional. Disable automatic stack rollback in case of deployment failure. We do not recommend using this flag for a production environment. --resource-tags stringToString Optional. Labels with a key and value separated by commas. Allows you to categorize resources. (default ) --tag string Optional. The container image tag.
--no-rollback flag is not recommended while deploying to a production environment as it may introduce service downtime.
If the deployment fails when automatic stack rollback is disabled, you may be required to manually start the stack
rollback of the stack via the AWS console or AWS CLI before the next deployment.
Deploys a job named "report-gen" to a "test" environment.
$ copilot job deploy --name report-gen --env test
Deploys a job with additional resource tags.
$ copilot job deploy --resource-tags source/revision=bb133e7,deployment/initiator=manual`