public class CredentialsUtil extends Object
Constructor and Description |
---|
CredentialsUtil() |
Modifier and Type | Method and Description |
---|---|
static com.google.api.client.auth.oauth2.Credential |
getGoogleCredential(com.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials robotCreds)
Get the Credential from the Google robot credentials for GKE access.
|
static com.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials |
getRobotCredentials(ItemGroup itemGroup,
com.google.common.collect.ImmutableList<com.cloudbees.plugins.credentials.domains.DomainRequirement> domainRequirements,
String credentialsId)
Get the Google Robot Credentials for the given credentialsId.
|
public static com.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials getRobotCredentials(ItemGroup itemGroup, com.google.common.collect.ImmutableList<com.cloudbees.plugins.credentials.domains.DomainRequirement> domainRequirements, String credentialsId) throws AbortException
itemGroup
- A handle to the Jenkins instance. Must be non-null.domainRequirements
- A list of domain requirements. Must be non-null.credentialsId
- The ID of the GoogleRobotCredentials to be retrieved from Jenkins and
utilized for authorization. Must be non-empty or non-null and exist in credentials store.AbortException
- If there was an issue retrieving the Google Robot Credentials.public static com.google.api.client.auth.oauth2.Credential getGoogleCredential(com.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials robotCreds) throws AbortException
robotCreds
- Google Robot Credential for desired service account.AbortException
- if there was an error initializing HTTP transport.Copyright © 2016–2019. All rights reserved.