https://github.com/pcpratheesh/ecs-task-definition-ci-cd
An example code for CI/CD deployment of ECS task definition
https://github.com/pcpratheesh/ecs-task-definition-ci-cd
aws aws-ecs ci cicd
Last synced: 3 months ago
JSON representation
An example code for CI/CD deployment of ECS task definition
- Host: GitHub
- URL: https://github.com/pcpratheesh/ecs-task-definition-ci-cd
- Owner: pcpratheesh
- Created: 2021-05-10T14:28:01.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-23T10:16:05.000Z (almost 5 years ago)
- Last Synced: 2025-05-30T00:41:38.199Z (about 1 year ago)
- Topics: aws, aws-ecs, ci, cicd
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ecs-task-definition-ci-cd
This repository is simply update the docker image inside an aws ecs cluster task.
### Work flow
When a new update pushed into **staging**, **pre-production**, or **production** branches, the pipline configuration will trigger. It will build a new docker image and pushed to the ECR REPO. Then it will make a new task definition and update the cluster service
# Github Secrets
For working this i have added the aws credentials as github secrets. You can add the secrets from settings tab under repository. [Read more](https://docs.github.com/en/actions/reference/encrypted-secrets)
Have to configure following secret credentials
- AWS_ACCESS_KEY_ID : AWS access key
- AWS_SECRET_ACCESS_KEY : AWS secret key
- AWS_ECR_REPO : docker image container repo
- AWS_ECS_CLUSTER : cluster name
### Execution
run main.go under cmd folder to execute in local
### Build docker image
docker build -t golang-sample-app -f ./Dockerfile .
#### dev.workflow.yml
Will execute the test cases for each every push requests
## deployment.workflow.yml
From this, actual deployment works