Skip to content

add withCredentials support #182

@ViliusS

Description

@ViliusS

What feature do you want to see added?

It would be very useful if this plugin would implement standard Credential Binging support via withCredentials. For now, if anyone needs to have Service Account JSON private key passed to let's say environment variable, you have to duplicate private key by uploading it to "Secret file" type. Then do:

withCredentials([file(credentialsId: 'privatekey-file', variable: 'GOOGLE_APPLICATION_CREDENTIALS')]) {
    sh "kubectl get pods"
}

So for Google Cloud and other Jenkins plugins "GoogleRobotPrivateKey" object is used, but for other custom stuff it's just a "Secret file".

Upstream changes

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions