Giter Site home page Giter Site logo

paba19 / amazon-ecs-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jenkinsci/amazon-ecs-plugin

0.0 0.0 0.0 422 KB

Amazon EC2 Container Service Plugin for Jenkins

Home Page: https://wiki.jenkins-ci.org/display/JENKINS/Amazon+EC2+Container+Service+Plugin

License: MIT License

Java 79.72% HTML 18.67% Groovy 1.61%

amazon-ecs-plugin's Introduction

Amazon Elastic Container Service Plugin for Jenkins

Build Status Join the chat at https://gitter.im/jenkinsci/amazon-ecs-plugin

About

This Jenkins plugin do use Amazon Elastic Container Service to host jobs execution inside docker containers.

  • see Jenkins wiki for detailed feature descriptions
  • use JIRA to report issues / feature requests

Building the Plugin

  $ java -version # Need Java 1.8, earlier versions are unsupported for build
  $ mvn -version # Need a modern maven version; maven 3.2.5 and 3.5.0 are known to work
  $ mvn clean install

To run locally, execute the following command and open the browser http://localhost:8080/jenkins/

  $ mvn -e hpi:run

Maintainers

Philipp Garbe (GitHub, Twitter)
Douglas Manley (GitHub)
Jan Roehrich (GitHub)

Documentation and Installation

Please find the documentation on the Jenkins Wiki page Amazon EC2 Container Service Plugin.

Declarative Pipeline

Declarative Pipeline support requires Jenkins 2.66+

Declarative agents can be defined like shown below. You can also reuse pre-configured templates and override certain settings using inheritFrom.
Note: You have to configure list of settings to be allowed in the declarative pipeline first (see the Allowed Overrides setting). They are disabled by default for security reasons, to avoid non-privileged users to suddenly be able to change certain settings.

pipeline {
  agent none

  stages {
    stage('Test') {
        agent {
            ecs {
                inheritFrom 'my-preconfigured-template'
                cpu 2048
                memory 4096
                logDriver 'fluentd'
                logDriverOptions([[name: 'foo', value:'bar'], [name: 'bar', value: 'foo']])
            }
        }
        steps {
            sh 'echo hello'
        }
    }
  }
}

FAQ

My parallel jobs don't start at the same time

Actually, there can be multiple reasons:

  • The plugin creates a new agent only when the stage contains an agent definition. If this is missing, the stage inherits the agent definition from the level above and also re-uses the instance.

  • Also, parallel stages sometimes don't really start at the same time. Especially, when the provided label of the agent definition is the same. The reason is that Jenkins tries to guess how many instances are really needed and tells the plugin to start n instances of the agent with label x. This number is likely smaller than the number of parallel stages that you've declared in your Jenkinsfile. Jenkins calls the ECS plugin multiple times to get the total number of agents running.

  • If launching of the agents takes long, and Jenkins calls the plugin in the meantime again to start n instances, the ECS plugin doesn't know if this instances are really needed or just requested because of the slow start. That's why the ECS plugin subtracts the number of launching agents from the number of requested agents (for a specific label). This can mean for parallel stages that some of the agents are launched after the previous bunch of agents becomes online.

amazon-ecs-plugin's People

Contributors

pgarbe avatar ndeloof avatar roehrijn avatar bruecktech avatar cyrille-leclerc avatar nullify005 avatar mseelye avatar mvallim avatar flah00 avatar daveygit2050 avatar wmpbar avatar ricmatsui avatar gsouza-newstore avatar afonsosilva91 avatar henkjan avatar gitter-badger avatar tamasflamich avatar mgeisler avatar liammaru avatar win-t avatar schwing avatar jekh avatar orctom avatar tekkamanendless avatar dee-kryvenko avatar cbamelis avatar carlossg avatar bensherman avatar webratz avatar abest0 avatar

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.