@groovy.transform.CompileStatic class GitlabExtension
Provides Gitlab token authentication to Terraform.
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
NAME |
Constructor and description |
---|
GitlabExtension
(Project tempProjectReference) |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
clearAllCredentials() Removes any credential customisations and reset to a no-credential state. |
|
Provider<SessionCredentials> |
getCredentialsEnvForWorkspace(java.lang.String name) Provide the credentials for a specific workspace. |
|
boolean |
hasCredentials() Whether any credentials has been configured for this provider. |
|
void |
useGitlabTokenFromEnvironment() Sets the default to be to use GITLAB_TOKEN from the environment and pass as-is to Terraform . |
|
void |
useGitlabTokenFromEnvironment(java.lang.String workspace) Sets the credentials for a specific workspace to use Gitlab credentials from the environment and pass as-is to Terraform . |
|
void |
useProperty(java.lang.String gitlabTokenPropertyName) Pass these property values to Terraform to use as authentication for a specific workspace. |
|
void |
useProperty(java.lang.String workspace, java.lang.String gitlabTokenPropertyName) Pass these property values to Terraform to use as authentication for a specific workspace. |
|
void |
useProperty(Provider<java.lang.String> gitlabTokenProvider) Use a provider for the Gitlab token. |
|
void |
useProperty(java.lang.String workspace, Provider<java.lang.String> gitlabTokenProvider) Use a provider for the Gitlab token for a specific workspace. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Removes any credential customisations and reset to a no-credential state.
Provide the credentials for a specific workspace.
name
- Workspace nameWhether any credentials has been configured for this provider.
true
if credentials have been configured. Sets the default to be to use GITLAB_TOKEN
from the environment and pass as-is to Terraform
.
Sets the credentials for a specific workspace
to use Gitlab credentials from the environment and pass as-is to Terraform
.
This will replace any assumeRole configuration for the specific workspace.
workspace
- Workspace to use. Pass these property values to Terraform
to use as authentication for a specific workspace.
Use the values that are supplied by the following property names.
Properties are searched in order of Gradle properties, then system properties and finally
environmental variables. For the latter the convention of converting dots to underscores and uppercasing
the name is used.
Calling this will remove any external influence available via useGitlabTokenFromEnvironment.
gitlabTokenPropertyName
- Property name for the Gitlab token. Pass these property values to Terraform
to use as authentication for a specific workspace.
Use the values that are supplied by the following property names.
Properties are searched in order of Gradle properties, then system properties and finally
environmental variables. For the latter the convention of converting dots to underscores and uppercasing
the name is used.
Calling this will remove any external influence available via useGitlabTokenFromEnvironment.
workspace
- Workspace namegitlabTokenPropertyName
- Property name for the Gitlab token.Use a provider for the Gitlab token. Calling this will remove any external influence available via useGitlabTokenFromEnvironment.
gitlabTokenProvider
- Provider for the Gitlab token.Use a provider for the Gitlab token for a specific workspace. Calling this will remove any external influence available via useGitlabTokenFromEnvironment.
gitlabTokenProvider
- Provider for the Gitlab token.