GithubHelp home page GithubHelp logo

jenkins-ecs-deployment's Introduction

Jenkins CI/CD for Docker containers to Amazon ECR/ECS


An example repoistory of how I deploy Docker containers to ECS over Jenkins, that was optimized for webpack powered apps for frontend.

  • Can be customized to match your project needs.

  • Can be a CI/CD template for the microservices to help you ship your service quickly over a CI/CD platform.

Customization


That was an example built with a react/webpack project, but it can be cusomized easily to match your project setup.

  • Search for TODOs and followup replacing to mtach the project needs.

  • Depends on the project the docker files, and nginx configs might have different setup.

jenkins-ecs-deployment's People

Contributors

mhmoudgmal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jenkins-ecs-deployment's Issues

Erron when stopping tasks

I was using your code for few days to deploy my docker containers into the aws ecs
I am getting some difficulty in stopping the current running task.

++
if(currTaskDef) {
sh "
aws ecs update-service --cluster ${clusterName}
--service ${serviceName}
--task-definition ${taskFamily}:${currTaskDef}
--desired-count 0
++
The above code will stop the tasks in the service so the next code block for stopping the actual task is failing and the Jenkins is failing at that stage.

+++++++
if (currentTask) {
sh "aws ecs stop-task --cluster ${clusterName} --task ${currentTask}"
}
+++++++

The script "sh "aws ecs stop-task --cluster ${clusterName} --task ${currentTask}"" is stopping only the one task in the variable "currentTask" , When 2 task is running we may need to use the "for loop". But I cant find how to write that for loop in groovy format. I appreciate if you can look into this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.