Coder Social home page Coder Social logo

Comments (5)

pgarbe avatar pgarbe commented on July 28, 2024 1

Which version are you using? The declarative support comes with 1.20 with is currently in beta (1.20-beta2)

from amazon-ecs-plugin.

albac avatar albac commented on July 28, 2024

On version 1.19, which is the latest officially at this moment, you can still use this:

pipeline {
  agent none
  stages {
    stage('Test') {
        agent { label 'fargate-slave'}
        steps {
            sh 'echo hello from fargate'
        }
    }
  }
}

And works as long as you setup correctly fargate on settings and use that label.

from amazon-ecs-plugin.

alineprattiezops avatar alineprattiezops commented on July 28, 2024

Which version are you using? The declarative support comes with 1.20 with is currently in beta (1.20-beta2)

Please, could help us?
We install 1.20-beta2 but we are not having success in the declarative override:

pipeline {
agent any
stages {
stage('Test') {
agent {
ecs {
cloud 'cloud-default'
label 'ecs'
image 'jenkinsci/jnlp-slave'
launchType 'FARGATE'
memory 4096
cpu 2048
subnets 'subnet-xxxxxxxxxxxxx'
securityGroups 'sg-xxxxxxxxxxx'
assignPublicIp true
taskrole 'arn:aws:iam::xxxxxxxxxxxxxxx:role/ecsTaskExecutionRole'
inheritFrom 'fargate-template'
}
}
steps {
sh 'echo hello'
}
}
}
}

Jenkins output:
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Test)
[Pipeline] ecsTaskTemplate
[Pipeline] // ecsTaskTemplate
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: Cloud does not exist: cloud-default
Finished: FAILURE

Jenkins Log:
Apr 11, 2019 9:13:08 PM INFO com.cloudbees.jenkins.plugins.amazonecs.pipeline.ECSDeclarativeAgent getAsArgs
In getAsArgs. label: ecs
Apr 11, 2019 9:13:08 PM INFO com.cloudbees.jenkins.plugins.amazonecs.pipeline.ECSDeclarativeAgent getAsArgs
In getAsArgs. argMap: {assignPublicIp=true, cloud=cloud-default, cpu=2048, image=jenkinsci/jnlp-slave, inheritFrom=fargate-template, label=ecs, launchType=FARGATE, memory=4096, name=ecs, overrides=[assignPublicIp, cloud, cpu, image, inheritFrom, label, launchType, memory, securityGroups, subnets, taskrole], privileged=false, securityGroups=sg-xxxxxxxx, subnets=subnet-xxxxxxxx, taskrole=arn:aws:iam::xxxxxxxx:role/ecsTaskExecutionRole}
Apr 11, 2019 9:13:08 PM INFO org.jenkinsci.plugins.workflow.job.WorkflowRun finish
test_pipeline #36 completed: FAILURE

from amazon-ecs-plugin.

pgarbe avatar pgarbe commented on July 28, 2024

In your Jenkins settings (Manage Jenkins -> Configure System), did you set up a "Amazon EC2 Container Services Cloud" with name"default-cloud"? Maybe this is missing?

from amazon-ecs-plugin.

pgarbe avatar pgarbe commented on July 28, 2024

closed. further discussion in #92

from amazon-ecs-plugin.

Related Issues (20)

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.