Skip to content

Provide the binding class to make credentials be usable with withCredentials pipeline function #386

@c-akurilin-godaddy

Description

@c-akurilin-godaddy

What feature do you want to see added?

I want to avoid credentials duplication and use the same item in job pipeline.
Unfortunately, "OpenstackCredentialv3" does not provide a binding class, so the only way to reuse credentials looks like:

def os_all_creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(
    jenkins.plugins.openstack.compute.auth.OpenstackCredentialv3
)
def os_credential = os_all_creds.findResult { it.id == "my-openstack-credentials" ? it : null }

The minor part of the hack relates to the fact that the credentials are not excluded from job run output.

Upstream changes

No response

Are you interested in contributing this feature?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions