I’m trying to setup a CodePipeline but with a few difficult things.
The GitLab server is private, AWS doesn’t have access
To fix that, we build the docker on GitLab and push it to ECR
That is working, working container is in ECR. But now we need an appspec and taskdef for the pipeline. It can’t be fetched from the repo (because it’s an internal server). What is the next best option to host these files? I tried S3, but that doesn’t seem to be working.
Hi, you can create a code deploy deloyment using aws cli from gitlab, I do the same with github actions. Trick is to also register ecs task def after you push to ECR then use the taskdef ARN in appspec, so it should be like
Build and push to ECR
Fill your taskdef with correct image, tags etc
Register the task def
Get the registered taskdef arn and add that to appspec
Use the now complete appspec revision with codedeploy