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:
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
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'.