question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Declarative pipeline Fargate example does not work (Invalid agent type "ecs" specified.)

See original GitHub issue

When I run a simple declarative pipeline like the one in your PR comments and your readme, I am hit with this error immediately when trying to create a Fargate agent:

Invalid agent type "ecs" specified. Must be one of [any, docker, dockerfile, label, none]

There is no “agent type” called “ecs” as far as Jenkins is able to determine, and we’ve even tried to restart the instance itself with hopes that maybe the plugin needed another reload before it could be detected and run properly in a pipeline.

The code we are trying is this example provided by this project, modified a bit to strip out any additional complications:

pipeline {
  agent none

  stages {
    stage('Test') {
        agent {
            ecs {
                inheritFrom 'jnlp-slave'
                cpu 2048
                memory 4096
            }
        }
        steps {
            sh 'echo hello'
        }
    }
  }
}

Can this documentation get some clarification? This is the only example we can find regarding using this in a declarative pipeline, so we have absolutely no idea what to change here to get this working.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pgarbecommented, Mar 11, 2019

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

0reactions
pgarbecommented, Apr 15, 2019

closed. further discussion in #92

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix the Jenkins error: Invalid agent type Docker specified ...
If you're Jenkins Docker build jobs are failing with the following error, don't fret, as there's a simple fix. Invalid agent type "docker" ......
Read more >
CI/CD for Fargate - YouTube
AWS Fargate is a serverless compute engine for containers, which removes the need to manage servers, and lets you specify and pay for ......
Read more >
Fix the Jenkins error: Invalid agent type ... - Manish Sharma
I started to learn Jenkins recently and while running simple pipeline I ran into problem and got error “Invalid agent type 'docker'”.
Read more >
Pipeline Steps Reference - Jenkins
Jenkins – an open source automation server which enables developers around the world to reliably build, test, and deploy their software.
Read more >
Jenkins pipeline - check if an ECS service exist - Stack Overflow
First you can run aws ecs describe-services to check if that service is already there and the state is ACTIVE . If it's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found