-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CredentialsPlugin should support more than username/password credentials #214
Comments
From @dkolb : OverviewCurrently Credentials Plugin only supports the build stage and Username/Password credentail types. The current use case I have requires mapping credentials onto TF_VAR_blah environment variables in the environment stages. Furthermore, some of these credentials are of the Current WorkaroundsCurrently I'm moving to decorating each stage directly in the Jenkinsfile for now. def validate = new TerraformValidateStage()
def deployDev = new TerraformEnvironmentStage('dev')
deployDev.decorate(TerraformEnvironmentStage.ALL, { closure ->
withCredentials([
usernamePassword(
credentialsId: 'some-user'
usernameVariable: 'TF_VAR_some_user',
passwordVariable: 'TF_VAR_some_passord'
),
string(
credentialsId: 'some-secret',
variable: 'TF_VAR_some_secret'
)
]) {
closure()
}
})
validate
.then(deployDev)
.build() |
CredentialsPlugin currently offers
That's way too specific, and does not indicate that it's using username/password credentials. Part of what makes this complicated is that Jenkinsfile uses specific DSL to generate binding configuration. Seems like there are 2 options:
Both options could be provided, without conflicting. Either way, the existing To sketch out what option 2 could look like:
^-- that would be the equivalent of:
We could make the method cumulative. So using your example above:
^--- that would produce the equivalent:
|
Let's deprecate |
The text was updated successfully, but these errors were encountered: