jenkinsci / jenkinsci/credentials-binding-plugin

[JENKINS-37864] Provide some mechanism for looking up whether credentials exist in Pipeline

Open
#424 2 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

In my use-case, I need to use the same Jenkinsfile on multiple Jenkins instances. The only differentiation between the two are the credentials which are available for use. (Basically, one instance is authorized for deployments, thus the credentials, the other is not).

My ideal would be a credentials global variable, or something like that, which could have utility methods like this. E.g.

node {

if (credentials.lookup('some-credentials-id')) {
withCredentials('some-credentials-id') {
sh './deploy.sh'
}
}
}

Related to JENKINS-37863">JENKINS-37863

---
Originally reported by rtyler, imported from: Provide some mechanism for looking up whether credentials exist in Pipeline


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

Raw content of original issue

In my use-case, I need to use the same Jenkinsfile on multiple Jenkins instances. The only differentiation between the two are the credentials which are available for use. (Basically, one instance is authorized for deployments, thus the credentials, the other is not).

My ideal would be a credentials global variable, or something like that, which could have utility methods like this. E.g.


node {

if (credentials.lookup('some-credentials-id')) {
withCredentials('some-credentials-id') {
sh './deploy.sh'
}
}
}

Related to JENKINS-37863

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.