allure-framework / allure-framework/allure2
Allure Commandline ignores environment variables created by "withCredentials" method in pipelines
- Dominant language
- HTML
- Stars
- 5.5k
- Forks
- 782
- Avg merge
- 2d 33m
- Merged PRs (30d)
- 16
Description
**Describe the bug**
If someone uses a declarative pipeline and wants to publish allure to Jira with:
script{
allure([allureSettings])
}
Combined with "withCredentials" nested in that script clousure, allure will ignore those new envs.
**To Reproduce**
Steps to reproduce the behavior:
1. Create a declarative pipeline
2. Use withCredentials function to bind password and username to proper env (ALLURE_JIRA_USERNAME/ALLURE_JIRA_PASSWORD) in the script clousure
3. Inside the clousure for "withCredentials" method call allure syntax for pipeline
**Expected behavior**
The envs are during the script but allure ignores them and throws exception
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environment (please complete the following information):**
| Allure version | 2.13.4 |
| --- | --- |
| Test framework | testng@6.8 |
| Allure adaptor | allure-testng@2.9.0 |
| Generate report using | allure-maven@2.18 |
**Additional context**
The issue does not occur if given job has ability to bind those credentials before starting build or steps (like maven job or freestyle job).
Contributor guide
Research direction
Start with the declarative pipeline steps using withCredentials and the allure([allureSettings]) pipeline syntax, using the listed Allure, TestNG, and Maven versions as context. Reproduce the credential binding scenario and compare it with credentials bound before the build; done means credentials created inside withCredentials are honored when publishing to Jira.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100