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

Fix environment variables resolution #371

Merged
merged 2 commits into from
Nov 20, 2024
Merged

Conversation

gabrielcarioca
Copy link

@gabrielcarioca gabrielcarioca commented Sep 23, 2024

We were using a deprecated perform method without the env parameter coming from it, meaning we were not getting environment variables sent to the build from Jenkinsfile, for example.

Updated the perform and generateReport methods to inherit and use the proper environment variables set by the user.

Resolves #360

)

Testing done

I've tested it local and in our company pipeline that were failing as we couldn't set the JAVA_HOME for the allure command to run.

Before: Even though JAVA_HOME was properly set, as we can see from the logs, the execution failed
image

After: Properly found the JAVA_HOME sent as a parameter and created the allure report
image
image

For a pipeline we had running in linux in which we sent the jdk parameter it continued working as before.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Copy link
Member

@baev baev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please rebase the PR

…ariables and inherit the ones added on Jenkinsfile
@gabrielcarioca
Copy link
Author

could you please rebase the PR

Done

@baev baev changed the title Bugfix for #360 Fix environment variables resolution Nov 20, 2024
@baev baev merged commit b60af52 into jenkinsci:master Nov 20, 2024
1 check passed
@baev
Copy link
Member

baev commented Nov 20, 2024

@gabrielcarioca thanks!

@baev baev added the type:bug label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't find a way to pass JVM parameters to allure from Jenkins pipeline
3 participants