Hello,
I am looking for a way to define a folder credential of type “secret file” and “secret text” with Job DSL.
Up to now i was able to generate a folder with a username/password credential using the following snippet:
folder("test") {
description 'The folder contains all jobs for regular tests'
properties {
folderCredentialsProperty {
domainCredentials {
domainCredentials {
domain {
name("test")
description("Credentials necessary for our tests")
}
credentials {
usernamePasswordCredentialsImpl {
scope("GLOBAL")
id("test_user_id")
description("User for deployments on test environment")
username("test_user_dev")
password("password")
}
}
}
}
}
}
}
Does anyone can provide me a sample in how to create a folder credential for both types “secret text” and “secret file”?
Thanks in advance,
Rainer