Got quite similar issue - windows jenkins node, but jenkins folder is on D: drive
Job is publishing two things, first works fine, the other fails.
writeFile file: 'changes.html', text: SummaryChangesLog
publishHTML([allowMissing: false, alwaysLinkToLastBuild: true, keepAll: true, reportDir: env.WORKSPACE, reportFiles: "changes.html", reportName: 'Summary Changes', reportTitles: ''])
above does publish single file and does not fail, while does not work too:
[Pipeline] publishHTML
00:21:16 - 31 Oct [htmlpublisher] Archiving HTML reports...
00:21:16 - 31 Oct [htmlpublisher] Archiving at BUILD level d:\jenkins\workspace\Interfaces\interfaces_21dev_ukcam to C:\Jenkins\jobs\Interfaces\jobs\interfaces_21dev_ukcam\builds\17\htmlreports\Summary_20Changes
the c drive path is not existing and its pretty odd, there is no jobs folder in jenkins at all, it looks like path mangled with url
the other publish does the folder and it fails
publishHTML([allowMissing: false, alwaysLinkToLastBuild: true, keepAll: true, reportDir: TestsLocation, reportFiles: "Results.html", reportName: 'Test Results', reportTitles: ''])
where TestsLocation is set to
\\\\companyftp\\Week\\Interfaces21dev-Test-Results
with outcome:
[Pipeline] publishHTML
06:15:57 - 31 Oct [htmlpublisher] Archiving HTML reports...
06:15:57 - 31 Oct [htmlpublisher] Archiving at BUILD level \\companyftp\Week\Interfaces21dev-Test-Results\Int2D to C:\Jenkins\jobs\Interfaces\jobs\interfaces_21dev_ukcam\builds\17\htmlreports\Test_20Results
06:15:57 - 31 Oct ERROR: Directory '\\companyftp\Week\Interfaces21dev-Test-Results\Int2D' exists but failed copying to 'C:\Jenkins\jobs\Interfaces\jobs\interfaces_21dev_ukcam\builds\17\htmlreports\Test_20Results'.
Thanks rkim12 for raising the issue. However I'm a little confused - from reading your description it appears that you have moved Jenkins from /var/lib/jenkins to /home/jenkins and the screenshot you have provided seems to show it writing to the correct /home/jenkins location? Are you able to clarify the issue you are seeing? (I assume /home/jenkins is not just a symlink to /var/lib/jenkins as that would obviously make the results available at "both" locations)