Reputation: 149
I followed below steps to get Allure report in jenkins but getting error, i was able to get report locally
1.Added Allure Commandline installations (image 1)
2.Added post build action allure-results (image 2)
Error
[Project-Allure] $ C:\Windows\system32\config\systemprofile\AppData\Local\Jenkins.jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\Allure_2.13.7\bin\allure.bat generate -c -o C:\Windows\system32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Project-Allure\allure-report The input line is too long. The syntax of the command is incorrect. ERROR: Build step failed with exception ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not generate Allure Report, exit code: 255 at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:314) at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:231) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:752) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1074) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:697) at hudson.model.Run.execute(Run.java:1932) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Build step 'Allure Report' marked build as failure Finished: FAILURE
Upvotes: 2
Views: 1891
Reputation: 11
Just to add one more possible solution. I have just shortened the command by reducing path size of the APP_HOME variable inside allure.bat file. This path points to the Allure app folder. Just copy Allure app into some folder like C:\Allure and set that APP_HOME to that path.
Upvotes: 0
Reputation: 1
I already solved this problem. When you install Jenkins you have 2 packages, 1 - with the path from install popup and 2 in "C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins". In the 2nd package, you have all information for Jenkins (plugins, settings, etc.). So, you need in file "jenkins.xml"(in the 1st package) change all "%LocalAppData%" on the current path (Example: "%LocalAppData%\Jenkins.jenkins" to "C:\Jenkins.jenkins"). After these steps, you need to customize Jenkins again and you will have a working version of the program.
Upvotes: 0
Reputation: 361
I also had this issue, I found a workaround which worked for me here by peterfranks.
The issue is due to an allure batch file which unnecessarily passes a very long classpath variable to java.exe which causes the command to exceed its character limits. The solution is to edit this file and remove -classpath "%CLASSPATH%"
on line 85. Java.exe already knows the classpath since its already set as an environment variable.
The file on my jenkins server is located here:
C:\Users\aws_jenkins_services\AppData\Local\Jenkins\.jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\Allure_2.13.8\bin
Upvotes: 1