I don't even know where to begin. JUnit plugin is installed and is running in some scripts (I couldn't find those, it's a large project, but the statistic page indicates 28 usages). But, the pipeline code junit "foo.xml"
fails with
java.lang.NoSuchMethodError: No such DSL method 'junit' found among steps
Followed by 100,500 lines of usual nonsense.
Is there anything special I need to do to "enable" this plugin? Jenkins wiki lists it as "required" (whatever that means). The example Jenkinfile
that illustrates the usage of this plugin never imports anything. Nonexistent debugging and ninja-style documentation don't really help getting to the culprit of this problem.
When I tried to replace junit 'foo.xml'
with step([$class: 'JUnitResultArchiver', testResults: './foo.xml'])
. This "step" produced the following output:
Recording test results
And failed the build without any further messages. Neither in console nor in the logs collected by the pipeline.