IIUC, you are missing the body of the withCredentials step, so something
like the below should work
...
stage ('Upload war to Artifactory') {
withCredentials([usernamePassword(credentialsId: 'artifactory',
usernameVariable: 'user', passwordVariable: 'password')]) {
sh "sudo curl -u
Hello guys first time writting here was wondering If I culd get some help:
I have a jenkins pipeline from SCM running in jenkins with a groovyscript.
In one of the steps I have upload a file to artifactory with CURL - u
user:pass , but don´t wan´t that user and pass be visible in output of
pipe