allure-plugin
allure-plugin copied to clipboard
Jenkins pipeline job cannot find allure commandline
Issue
Context
-
Jenkins version: 2.73.1
-
Job type: Pipeline (Bitbucket Team/Project)
-
Allure plugin version: 2.24
-
Allure commandline version: 2.4.1
Problem description
We are running some E2E tests using WebdriverIO using a Jenkins pipeline job. We are using a custom docker image that has Java 8, Allure 2.4.1 and node 6.11.5 installed (since the tests are written in Javascript).
In Global Tool Configuration
under Allure Commandline
we have selected the Run Shell Command
option and filled out /usr/local/lib/allure-2.4.1/bin/allure
for Command
and /usr/local/lib/allure-2.4.1
for Tool Home
.
Our Jenkinsfile looks somewhat like this at the end (I've exluded some not really relevant parts):
post {
always {
script {
sh '/usr/local/lib/allure-2.4.1/bin/allure'
allure([
includeProperties: false,
jdk: '',
properties: [],
reportBuildPolicy: 'ALWAYS',
results: [[path: 'allure-results']]
])
}
}
}
When running this post step, the line sh '/usr/local/lib/allure-2.4.1/bin/allure'
gives us this output:
+ /usr/local/bin/allure
Usage: allure [options] [command] [command options]
... rest omitted ...
While the allure
command returns the following error message:
line 1: /usr/local/lib/allure-2.4.1/bin/allure: not found
Which kind of confuses us, because the two lines get executed inside the same docker container, directly after one another.
We would expect that the allure
executable get found and executed
Logs & Traces
This is the content of the Dockerfile we're using:
FROM openjdk:8-jdk
ARG ALLURE_VERSION=2.4.1
ARG NODE_VERSION=v6.11.5
RUN wget https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/${ALLURE_VERSION}/allure-${ALLURE_VERSION}.zip -O /tmp/allure-${ALLURE_VERSION}.zip && \
unzip /tmp/allure-${ALLURE_VERSION}.zip -d /usr/local/lib && \
rm -rf /tmp/allure-${ALLURE_VERSION}.zip && \
mkdir -p /root/bin && \
ln -s /usr/local/lib/allure-${ALLURE_VERSION} /usr/local/lib/allure && \
ln -s /usr/local/lib/allure-${ALLURE_VERSION}/bin/allure /root/bin/allure && \
ln -s /usr/local/lib/allure-${ALLURE_VERSION}/bin/allure /usr/local/bin/allure && \
wget https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-x64.tar.xz -O /tmp/node-${NODE_VERSION}-linux-x64.tar.xz && \
tar Jxvf /tmp/node-${NODE_VERSION}-linux-x64.tar.xz -C /usr/local/lib && \
rm -rf /tmp/node-${NODE_VERSION}-linux-x64.tar.xz && \
ln -s /usr/local/lib/node-${NODE_VERSION}-linux-x64 /usr/local/lib/node && \
ln -s /usr/local/lib/node-${NODE_VERSION}-linux-x64/bin/node /usr/local/bin/node && \
ln -s /usr/local/lib/node-${NODE_VERSION}-linux-x64/bin/npm /usr/local/bin/npm
I hope this is the right place to ask and we've provided enough information. Thanks
We have more or less the same setup and we are experiencing exactly the same issue.
kinda curious whether you guys figured out the solution. I am facing same issue with webdriverio and allure reporter. Please suggest. Thank you.
any update on this guys??? please help me I'm facing the same issue
15:13:22 OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"/home/ec2-user/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/allure260/bin/allure\": stat /home/ec2-user/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/allure260/bin/allure: no such file or directory": unknown
same here, still no updates on this issue... 5 years have passed...