jenkinsci / allure-plugin

Allure Jenkins Plugin
https://plugins.jenkins.io/allure-jenkins-plugin/
Other
84 stars 63 forks source link

allure executable should be resolved from PATH or ALLURE_HOME #218

Open taraspos opened 6 years ago

taraspos commented 6 years ago

Issue

Context

Problem description

Plugin doesn't resolve allure executable from PATH or ALLURE_HOME variable and works only if Tool Installation is set.

Logs & Traces

[Pipeline] step
Error when executing always post condition:
java.io.IOException: Can't find allure commandline <null>
    at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation$2.call(AllureCommandlineInstallation.java:63)
    at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation$2.call(AllureCommandlineInstallation.java:58)
    at hudson.remoting.UserRequest.perform(UserRequest.java:212)
    at hudson.remoting.UserRequest.perform(UserRequest.java:54)
    at hudson.remoting.Request$2.run(Request.java:369)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
    at java.lang.Thread.run(Thread.java:748)

Related issues

Proposed fix:

Resolve allure binary from PATH here and resolve ALLURE_HOME variable as a path to Allure installation here

arcones commented 3 years ago

We found a workaround for this placing allure CLI directly in the root of the docker image where we run the pipelines (our agent) and creating a symlink from there to /bin.

Once downloaded & unpacked the allure-commandline-X.Y.Z.zip doing something like this:

    mv allure-commandline-X.Y.Z /allure-cli && \
    ln -s /allure-cli/bin/allure /bin/allure

where X.Y.Z is the version of allure CLI