Hi, just tried to use it, but I get a NPE on ClaimPublisher:62, could you please provide a short example that's working for you so that I can check if I screwed up something?
node {
echo "hello world"
step([$class: 'ClaimPublisher'])
}
Looking at the tests and code, I'm wondering if the issue isn't related to the fact that due to how Pipeline works, the ClaimPublisher step is gonna be called immediately and not after the build has finished. In the test, catchError is called before that step, hence force-setting a result IIUC.
The line 62 is:
if (build.getResult().isWorseThan(Result.SUCCESS)) {
WDYT?
Just wanted to discuss this before, but I guess I could propose a PR for that if need be.
Cheers
Code changed in jenkins
User: Andrew Bayer
Path:
pom.xml
src/main/java/hudson/plugins/claim/ClaimPublisher.java
http://jenkins-ci.org/commit/claim-plugin/c863b59aa8fb1b8c2b679f18c14e75df4a6c1ba2
Log:
JENKINS-27206- Move claim-plugin to use SimpleBuildStep