jenkinsci / jenkinsci/credentials-binding-plugin

[JENKINS-69969] usernamePassword binding not setting variables correctly on Windows container

Open
#504 0 comments 0 reactions 0 assignees View on GitHub
component:credentials-binding-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
57
Forks
108
PR merge metrics
No merged PRs in 30d

Description

When using the following in a declarative pipeline:

 

withCredentials([usernamePassword(credentialsId: 'nuget', usernameVariable: 'NUGET_USERNAME', passwordVariable: 'NUGET_PASSWORD')])


{
  set
}
 
The NUGET_USERNAME is not being set at all, but the NUGET_PASSWORD is incorrectly having the set NUGET_USERNAME command appended, as follows:
 
{code:java}

NUGET_PASSWORD=****set NUGET_USERNAME=nuget



 

This looks like it is missing a new line between the two operations.

---
Originally reported by bencarter_crb, imported from: usernamePassword binding not setting variables correctly on Windows container


  • status: Open
  • priority: Minor
  • component(s): credentials-binding-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20251211-141027

Raw content of original issue

When using the following in a declarative pipeline:

 
withCredentials([usernamePassword(credentialsId: 'nuget', usernameVariable: 'NUGET_USERNAME', passwordVariable: 'NUGET_PASSWORD')])


{
  set
}
 
The NUGET_USERNAME is not being set at all, but the NUGET_PASSWORD is incorrectly having the set NUGET_USERNAME command appended, as follows:
 
{code:java}

NUGET_PASSWORD=****set NUGET_USERNAME=nuget






 

This looks like it is missing a new line between the two operations.

environment

```
Jenkins v2.375

Credentials Binding Plugin v523.vd859a_4b_122e6

AKS Windows node
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.