I am new to Jenkins and have decided to learn about the Pipeline declarative script. After reading and watching several tutorials on writing a simple Pipeline script, I had decided to give it a go on Jenkins.
When running the simple script, it displays the following error message - ‘This Pipeline has run successfully, but does not define any stages. Please use the stage step to define some stages in this Pipeline’,
However, after combing through the script and comparing it to the tutorial scripts online, everything appears to be precisely the same. So what is going on here? Is it perhaps a plugin issue?
Are you sure you that run in your screenshots is after the script was run? You have no echo statement in the logs.
I’m guessing for some reason a run happened. Then the pipeline script was added. Then you saw those messages. You’ll have to run it again. Jenkins is only able to talk about the last run (s) not the current state of the script
This also happens to me with a Jenkins started from docker image jenkins/jenkins:2.332.3 and any pipeline (including your hello world pipeline). Since this is also the first google result to the problem, it would be nice if there would be a possible solution.
The described behavior feels like that there is only the pipeline support for scripted syntax (a subset of all the pipeline plugins), not the declarative (another subset). usually, both are installed if you install Blue Ocean, or if you proceeded with the “install recommended plugins” with the UI wizard.
2022-06-06 09:13:56.896+0000 [id=40] SEVERE jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Pipeline: Nodes and Processes v1144.vd77b_57189936 (workflow-durable-task-step)
java.io.IOException: Failed to load: Pipeline: Nodes and Processes (workflow-durable-task-step 1144.vd77b_57189936)
- Update required: Pipeline: API (workflow-api 1153.vb_912c0e47fb_a_) to be updated to 1162.va_1e49062a_00e or higher
at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:1018)
at hudson.PluginManager$2$1$1.run(PluginManager.java:542)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:175)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
at jenkins.model.Jenkins$5.runTask(Jenkins.java:1156)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:222)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:121)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
which is surprising to me, since my /usr/local/bin/install-plugins.sh contains
fixes the issue. It seems like the workflow-durable-task-step update to 1144.vd77b_57189936 does not work with Jenkins LTS 2.332.3 (with version 2.350, latest also works).