Open thedevopsguyblog opened 1 year ago
Ok, i've solved my null pointer error, i was missing a ,
after declaring serviceNowConfiguration
.
But this still leaves me in the same position - passing username:passwrd
securely to credentialsId
I've tried this...
script{
withCredentials([usernamePassword(credentialsId: 'ADMIN-ACCOUNT', usernameVariable: 'snowID', passwordVariable: 'snowPswrd')]) {
serviceNow_createChange serviceNowConfiguration:[
instance: "${instandId}",,
producerId: "${sysId}"
],
credentialsId: "${snowId}:${snowPswrd}"
}
}
A couple of issues with this approach...
def
inside withCredentials
The other thing i tried was wrapping just credentialsId
inside withCredentials
but that ended up actually exposing my username and password in the console log < very bad!
So still stuck on how to pass username:password
to credentialsId
Describe your use-case which is not covered by existing documentation.
Hello,
Great work on this plugin - very useful!
I'm trying to use this plugin in a declarative-pipeline but running into issues around implementing
credentialsId
.I think a common use case is handling credentials with credentials-binding
Could I please have some guidance around what the correct syantax is - alot of the documentation uses vault roles instead of the typical 'username:password' that would be used in cURL.
Here is the result from my most recent build...
PS: Are there any plans to uplift the documentation around Piepline Syntax support?
Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.
No response