I am using a docker agent to run tests inside a container and than generate allure report inside the "post" section.
Everytime the allure plugin is being called inside a container I get this errors when the allure plugin is in post:
15:58:54 OCI runtime exec failed: exec failed: unable to start container process: exec: "/home/ec2-user/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure_2.21.0/bin/allure": stat /home/ec2-user/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure_2.21.0/bin/allure: no such file or directory: unknown
[Pipeline] }
[Pipeline] // script
Error when executing always post condition:
Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: f5cbc352-0a53-454a-b486-e326e42261f7
ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not generate Allure Report, exit code: 126
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 org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
when I call the allure plugin from inside a step i get this error:
16:14:06 Ran all test suites matching /fields.test.ts/i.
[Pipeline] allure
16:14:06 Cannot find a history information about previous builds.
16:14:06 java.nio.file.AccessDeniedException: /home/ec2-user/workspace/Ad-hoc/be_testing_ad_hoc/allure-results/history
I tried adding to the Jenkins global settings a new empty allure CLI install just for using it in docker - but tools is not supported in docker container!
I tried with and without installing the allure CLI from the docker image - same errors.
I tried uploading the allure-results data to S3 and than calling it in post - same errors
I tried stash unstash - same errors
I tried archive artifacts and generating via CLI- it works, but I cant serve the report without the plugin
I tried adding chmod for allure results:
sh 'chmod -R 777 $(pwd)/allure-results'
allure includeProperties: false, jdk: '', results: [[path: "allure-results"]]
15:58:54 OCI runtime exec failed: exec failed: unable to start container process: exec: "/home/ec2-user/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure_2.21.0/bin/allure": stat /home/ec2-user/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure_2.21.0/bin/allure: no such file or directory: unknown
[Pipeline] }
[Pipeline] // script
Error when executing always post condition:
Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: f5cbc352-0a53-454a-b486-e326e42261f7
ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not generate Allure Report, exit code: 126
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 org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
15:58:54
[Pipeline] // ansiColor
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] }
[Pipeline] // timeout
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
$ docker stop --time=1 4f6631cff8c8d977a20ba4265515c9ea710e164c31325811b6ab25463fdf8ad2
$ docker rm -f --volumes 4f6631cff8c8d977a20ba4265515c9ea710e164c31325811b6ab25463fdf8ad2
[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // withDockerRegistry
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: f5cbc352-0a53-454a-b486-e326e42261f7
ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not generate Allure Report, exit code: 126
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 org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Finished: FAILURE
Another approach i tried is generating the report directly using the allure CLI without the plugin. But its not showing the report. Its trying to start a server which will keep my job hanging, also it wont show the report
allure generate allure-results --clean
16:26:30 Report successfully generated to allure-report
16:26:30 + allure open
16:26:31 Starting web server...
16:26:31 2024-02-11 14:26:30.918:INFO::main: Logging initialized @800ms to org.eclipse.jetty.util.log.StdErrLog
16:26:31 Can not open browser because this capability is not supported on your platform. You can use the link below to open the report manually.
16:26:31 Server started at http://172.17.0.2:33913/. Press <Ctrl+C> to exit
Jenkins and plugins versions report
Environment
```text Paste the output here ```What Operating System are you using (both controller, and any agents involved in the problem)?
Linux, Jenkins
Reproduction steps
Allure plugin version: 2.30.3 Allure CLI Installation from maven: Allure 2.27.0
I am using a docker agent to run tests inside a container and than generate allure report inside the "post" section. Everytime the allure plugin is being called inside a container I get this errors when the allure plugin is in post:
15:58:54 OCI runtime exec failed: exec failed: unable to start container process: exec: "/home/ec2-user/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure_2.21.0/bin/allure": stat /home/ec2-user/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure_2.21.0/bin/allure: no such file or directory: unknown [Pipeline] } [Pipeline] // script Error when executing always post condition: Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: f5cbc352-0a53-454a-b486-e326e42261f7 ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not generate Allure Report, exit code: 126 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 org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)
when I call the allure plugin from inside a step i get this error: 16:14:06 Ran all test suites matching /fields.test.ts/i. [Pipeline] allure 16:14:06 Cannot find a history information about previous builds. 16:14:06 java.nio.file.AccessDeniedException: /home/ec2-user/workspace/Ad-hoc/be_testing_ad_hoc/allure-results/history
I tried adding to the Jenkins global settings a new empty allure CLI install just for using it in docker - but tools is not supported in docker container!
I tried with and without installing the allure CLI from the docker image - same errors.
I tried uploading the allure-results data to S3 and than calling it in post - same errors
I tried stash unstash - same errors
I tried archive artifacts and generating via CLI- it works, but I cant serve the report without the plugin
I tried adding chmod for allure results: sh 'chmod -R 777 $(pwd)/allure-results' allure includeProperties: false, jdk: '', results: [[path: "allure-results"]]
15:58:54 OCI runtime exec failed: exec failed: unable to start container process: exec: "/home/ec2-user/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure_2.21.0/bin/allure": stat /home/ec2-user/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure_2.21.0/bin/allure: no such file or directory: unknown [Pipeline] } [Pipeline] // script Error when executing always post condition: Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: f5cbc352-0a53-454a-b486-e326e42261f7 ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not generate Allure Report, exit code: 126 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 org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)
[Pipeline] } [Pipeline] // stage [Pipeline] } 15:58:54
[Pipeline] // ansiColor [Pipeline] } [Pipeline] // timestamps [Pipeline] } [Pipeline] // timeout [Pipeline] } [Pipeline] // withEnv [Pipeline] } $ docker stop --time=1 4f6631cff8c8d977a20ba4265515c9ea710e164c31325811b6ab25463fdf8ad2 $ docker rm -f --volumes 4f6631cff8c8d977a20ba4265515c9ea710e164c31325811b6ab25463fdf8ad2 [Pipeline] // withDockerContainer [Pipeline] } [Pipeline] // withDockerRegistry [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: f5cbc352-0a53-454a-b486-e326e42261f7 ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not generate Allure Report, exit code: 126 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 org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Finished: FAILURE
Another approach i tried is generating the report directly using the allure CLI without the plugin. But its not showing the report. Its trying to start a server which will keep my job hanging, also it wont show the report
My docker agent:
Expected Results
Allure to be shown!
Actual Results
Described above
Anything else?
No response
Are you interested in contributing a fix?
No response