Search code examples
jenkinsjenkins-blueocean

Jenkins Blue Ocean won't show Agent when creating a Pipeline


I'm new to Blue Ocean, and I'm following their tutorial which tells me to run:

docker run \
  --rm \
  -u root \
  -p 8080:8080 \
  -v jenkins-data:/var/jenkins_home \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v "$HOME":/home \
  jenkinsci/blueocean

It fired up the docker instance, I got to the Blue Ocean screen, Clicked on create a new pipeline, set the GitHub token, Etc.

Now I'm at the part where you select the Agent, but mine has no agent:

enter image description here

Moreover, if I click the save button and then "save & run" it gets stuck and the docker container output throws:

WARNING: Error while serving http://localhost:8080/blue/rest/pipeline-metadata/agentMetadata
java.lang.reflect.InvocationTargetException
  ... <stack trace here> ...

Caused by: java.lang.NoSuchMethodError: org.jenkinsci.plugins.pipeline.modeldefinition.agent.DeclarativeAgentDescriptor.all()Lhudson/ExtensionList;

I'm blank now and don't know what to do since that was the "out of the box" tutorial.

How can I fix this so I can advance?


Solution

  • It was a indeed a bug. I reported it and it is now solved. Here's the JIRA ticket: https://issues.jenkins-ci.org/browse/JENKINS-50805