[pipeline] publishHtml failed with file present

572 views
Skip to first unread message

jer...@bodycad.com

unread,
Jul 12, 2016, 12:10:35 PM7/12/16
to Jenkins Users
Hi,

I'm trying this into my piple Jenkinsfile:

publishHTML([allowMissing: true, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'x64\\Release\\FailedTestResult\\', reportFiles: 'index.html', reportName: 'Failed Tests']);

The directory is there and the index.html file exist too at that step. But I get the following error:

[Pipeline] publishHTML
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: Cannot publish the report. Target is not specified
Finished: FAILURE

I generate my line with the pipeline syntax tools. My question is what is the target and does it represent? Any place where we can find the API doc for all those pipeline functions? 

Thanks,
Jerome

jer...@bodycad.com

unread,
Jul 12, 2016, 12:15:48 PM7/12/16
to Jenkins Users
I think I found the solution on that page:

publishHTML([allowMissing: true, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'x64\\Release\\FailedTestResult\\', reportFiles: 'index.html', reportName: 'Failed Tests'])

should be

publishHTML(target:[allowMissing: true, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'x64\\Release\\FailedTestResult\\', reportFiles: 'index.html', reportName: 'Failed Tests'])

notice the extra target:
I guess the pipeline syntaxe for publishHTML have a typo. I would rather have a web link to the full API outside Jenkins.

Thomas Zoratto

unread,
Jul 12, 2016, 1:09:43 PM7/12/16
to jenkins...@googlegroups.com
Hi, 

this bug is already reported here : https://issues.jenkins-ci.org/browse/JENKINS-29711

publishHTML is not the only step impacted 

-- 
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/592333c4-e787-4fb8-842a-a80602ce6ab1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jérôme Godbout

unread,
Jul 12, 2016, 2:08:45 PM7/12/16
to jenkins...@googlegroups.com
Ok, thanks, get inline with what I observed. You say not the only step impacted, but how one fetch those name? any link to API or doc somewhere? I was lucky to find an example into the a plugin that showed it, but for other I'm a little lost to find those API naming (I'm totaly new to Groovy language and I'm not a Java programmer, C/C++/Python/Qml/C#).

How stable can we assume this API to be exactly? If I make my Jenkinsfile now, can I assume it will still work for any Jenkins 2.x version? Just to give myself an idea of the API stability at this point? In my case I need to be able to rebuild any software release for 10 years (medical regulation). So I can wait to push this into production until it get stable no problems (this burden is on my end ;-)  but I would appreciate if anyone can point me to some information on this, so I don't end up having 14 version of Jenkins to maintain into the long run.

Thanks,
Jerome

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/ZqXpxEPtRfE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1B5D1C01-C0B1-41F1-9E07-7BE0FB828F67%40gmail.com.

Antonio Muñiz

unread,
Jul 20, 2016, 12:08:15 PM7/20/16
to jenkins...@googlegroups.com
On Tue, Jul 12, 2016 at 8:08 PM, Jérôme Godbout <jer...@bodycad.com> wrote:
> If I make my Jenkinsfile now, can I assume it will still work for any
> Jenkins 2.x version? Just to give myself an idea of the API stability at
> this point?


I believe so. Backward compatibility is taken very seriously by
Pipeline developers, it's broken only when there is no other option.

--
Antonio Muñiz
Software Engineer
CloudBees, Inc.
Reply all
Reply to author
Forward
0 new messages