0

I have a requirement where i have to create a Fargate task that can clone a gitab repository(source code) and run a maven build command to build the code. And there would be another fargate task that would create a docker image out of it. Gitlab is on an EC2 instance.

Since we do not have exec access into the containers on Fargate, how and what would be the best way to do this. (I have multiple repos on Gitlab and so the repo that i want to clone and build is not going be the same every time)

I have been reading about the Amazon Elastic Container Service (ECS) / Fargate plugin on Jenkins.But i'm not sure if Jenkins can be used to get into a Fargate container and run commands.

Dilip
  • 365
  • 1
  • 6
  • 18
  • Any reason why fargate? Its seems as its more suited for CodeBulild and CodePipeline? – Marcin Feb 05 '21 at 23:14
  • It is i guess, but we wanted to try and see if we can do the build, test, scan,deploy etc.. via Fargate(ECS), main reasons being cost optimization, less infra/host management – Dilip Feb 06 '21 at 13:45
  • 1
    Could also look at using Lambda which is easier to use than ECS. Lamda has the limitation that the zipped project size has to be less than 50MB and unzipped project size less than 250MB, run time has to be less than 15 minutes. If a project is small enough for those limitations, then Lambda would be a better choice. – Bill Worthington Feb 08 '21 at 18:30

1 Answers1