13

I've tried the answer on Jenkins-Job fails but it didn't helped me.

Has anyone any different answer? Jenkins is installed on Ubuntu 12.04 under tomcat. I have configured it to make a build with CVS repository. When i am trying to make a new build it fails due to the below error.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:34.392s
[INFO] Finished at: Mon Aug 19 12:32:14 IST 2013
[INFO] Final Memory: 13M/206M
[INFO] ------------------------------------------------------------------------
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level /usr/local/tomcat/webapps/jenkins/jobs/Data_Ingestion_Tool/workspace/DataIngestionTool/target/site/jacoco to /usr/local/tomcat/webapps/jenkins/jobs/Data_Ingestion_Tool/builds/2013-08-19_12-28-39/htmlreports/Jacoco_Coverage_Report
ERROR: Directory '/usr/local/tomcat/webapps/jenkins/jobs/Data_Ingestion_Tool/workspace/DataIngestionTool/target/site/jacoco' exists but failed copying to '/usr/local/tomcat/webapps/jenkins/jobs/Data_Ingestion_Tool/builds/2013-08-19_12-28-39/htmlreports/Jacoco_Coverage_Report'.
ERROR: This is especially strange since your build otherwise succeeded.
Build step 'Publish HTML reports' changed build result to FAILURE
Finished: FAILURE

Am i missing any user permissions?

I've tried giving full read-write access to

/usr/local/tomcat/webapps/jenkins/jobs/Data_Ingestion_Tool/builds/

folder but it still doesn't help :(

i don't know how to give permissions to a logged in jenkins user. Can anybody help me in resolving this issue? Thanks in advance!

Fredrik Widerberg
  • 3,068
  • 10
  • 30
  • 42
neo jakson
  • 131
  • 1
  • 1
  • 4

3 Answers3

7

If you ruled out disk space and permissions, then the problem is probably configuration.

The error comes because the HTML publisher plugin copied 0 files. It could just be that your input configuration was incorrect.

Can you check your worskpace (/usr/local/tomcat/webapps/jenkins/jobs/Data_Ingestion_Tool/workspace/DataIngestionTool/target/site/jacoco) and check that the files you want to copy are under that path ?

If not, what do you have under /usr/local/tomcat/webapps/jenkins/jobs/Data_Ingestion_Tool/builds/2013-08-19_12-28-39/ ?

coffeebreaks
  • 3,787
  • 1
  • 26
  • 25
  • There are no files under (/usr/local/tomcat/webapps/jenkins/jobs/Data_Ingestion_Tool/workspace/DataIngestionTool/target/site/jacoco) and under /usr/local/tomcat/webapps/jenkins/jobs/Data_Ingestion_Tool/builds/2013-08-19_12-28-39/ , there are 3 files i,e. build.xml, changelog.xml and log file. – neo jakson Aug 19 '13 at 10:18
  • @neojakson if you have no files under ..../target/site/jacoco, there is your problem. E.g. you haven't run the proper maven goal for these files to appear, you are pointing to wrong location, etc. – coffeebreaks Aug 19 '13 at 19:05
  • 6
    so what is the solution? – Mahder Feb 05 '15 at 22:19
  • @Mahder, this "failed copying" error, indicates that **your last build step failed** to create the file that HTML Reporter is trying to publish. – Noam Manos Apr 27 '20 at 14:57
2

In my case misconfiguration of HTML publisher caused the problem

publishHTML([
  allowMissing: false,
  alwaysLinkToLastBuild: false,
  includes: '**/*.png',     <---------------------- this line
  keepAll: true,
  reportDir: 'reports/',
  reportFiles: 'broker_portal_uat_index.html',
  reportName: 'HTML Report',
  reportTitles: 'FH BP'
 ])

Once I changed it includes to includes: '**/*' the problem was gone

Sergey Pleshakov
  • 7,964
  • 2
  • 17
  • 40
1

Got the same issue as long as my target folder was empty. Once populated with a file, at least this error stopped showing.

Mahan Mashoof
  • 141
  • 1
  • 5
  • Faced the same issue & cause ️ this error message is quite misleading. Found this related discussion on Jenkins bug tracker: https://issues.jenkins.io/browse/JENKINS-7242 – Maxime Pacary May 15 '23 at 09:45