Re: Dollar sign in credentials broken for declarative pipelines

2018-02-14 Thread red 888
You are 100% correct, i was confused about what was actually happening here ( so may layers of parsing!). So thanks to this SO answer I can see there are two ways to handle

Re: Dollar sign in credentials broken for declarative pipelines

2018-02-13 Thread niristotle okram
I just had this a couple of days back in a shell script. I had to place the password string (which have the $) within a quote. But can we put the quotes in the password field of the jenkins credentials page, wont it not treat the quote as a part of the password string? I haven’t tested it though.

Re: Dollar sign in credentials broken for declarative pipelines

2018-02-13 Thread Mark Waite
Are you sure that's really a bug? If the value of mypass is 'ASD123$567' and that is passed as an environment variable to the shell, won't the shell see the '$567' and attempt to expand an environment variable named '567'? The expansion of $567 is probably the empty string. If '$' and other

Re: Dollar sign in credentials broken for declarative pipelines

2018-02-13 Thread Slide
Can you file an issue in JIRA? On Tue, Feb 13, 2018 at 7:10 PM red 888 wrote: > This is my password: "ASD123$567" > > This doesn't work > > withCredentials([usernamePassword(credentialsId: 'creds', > usernameVariable: 'myuser', passwordVariable: 'mypass')]) { >

Dollar sign in credentials broken for declarative pipelines

2018-02-13 Thread red 888
This is my password: "ASD123$567" This doesn't work withCredentials([usernamePassword(credentialsId: 'creds', usernameVariable: 'myuser', passwordVariable: 'mypass')]) { sh "some command --username ${svnuser} --password ${mypass}" } What i see in the output is mypass is not obfuscated