Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allure report path value in Jenkins - Post-build action can't be an environment variable #887

Open
ibalosh opened this issue Jan 25, 2019 · 12 comments

Comments

@ibalosh
Copy link

ibalosh commented Jan 25, 2019

Context

Jenkins version: 2.150.2
Allure plugin version: 2.27.0
Allure commandline version: 2.9.0

Problem description

My Jenkins configuration has two environment variables:

  • ALLURE_RESULTS_FOLDER - pointing to for example /home/tests/gen/allure-results/job_name
  • ALLURE_REPORT_FOLDER - pointing to for example /home/tests/allure_report/job_name

Each job runs multiple tests and creates unique folder for results and generated report.
Report and Result folders are retrieved from Jenkins global environment variables list.

How the job setup would look like in jenkins can be found on screenshot.

image

The problem is that when I use environment variables for Restults and Report, I can see on the machine where Jenkins runs that results and report are created correctly in specific folders. The problem is that the artifact is not packed correctly, so when I try to view report in Jenkins it doesn't work (seems archived report is empty). It seems environment variable is ignored on archiving the generated report.

If I don't use environment variable ALLURE_REPORT_FOLDER , but enter something like: /home/tests/allure_report/job_name in field Report Path , then artifact is created correctly and I can view report through Jenkins.

image

@baev
Copy link
Member

baev commented Jan 25, 2019

seems like duplicate of jenkinsci/allure-plugin#219

@ibalosh ibalosh changed the title Allure report path value in Jenkins as Post build action can't be an environment variable Allure report path value in Jenkins - Post build action can't be an environment variable Jan 25, 2019
@ibalosh ibalosh changed the title Allure report path value in Jenkins - Post build action can't be an environment variable Allure report path value in Jenkins - Post-build action can't be an environment variable Jan 25, 2019
@ibalosh
Copy link
Author

ibalosh commented Jan 25, 2019

that was fast :) thanks @baev !

@baev
Copy link
Member

baev commented Jan 25, 2019

@ibalosh feel free to submit a pull request with fixes, it should be like a few lines of code

@ibalosh
Copy link
Author

ibalosh commented Jan 28, 2019

ok, will check it out, could you point me to Jenkins plugin, is it https://github.com/jenkinsci/allure-plugin/tree/master/src/main/java/ru/yandex/qatools/allure/jenkins ?

@baev
Copy link
Member

baev commented Jan 28, 2019

yep

@158068672
Copy link

The issue is still there with v2.28.1

@158068672
Copy link

Is this issue fixed or not? @baev, thanks for your help

@158068672
Copy link

Hi @ibalosh,
have you solved this issue by any other way?

@ibalosh
Copy link
Author

ibalosh commented Aug 19, 2019

hey @158068672 ,

no :( I took a look back then at the code, but I could not figure out where the issue is.
I had to set folder for each job in jenkins without use of environment variables to work around the issue

@158068672
Copy link

@ibalosh I use my own python script to do the post-build allure report step to walk around this issue. The only insufficient is I need to open the generated html myself instead of viewing it in Jenkins. Hope it help.

@ibalosh
Copy link
Author

ibalosh commented Aug 19, 2019

thats a good idea, thanks @158068672 !

@roydekleijn
Copy link

would this be fixed any time soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants