[JIRA] (JENKINS-60724) Dollar sign get escaped in Jenkins Password Parameter

28 views
Skip to first unread message

vvatashki@gmail.com (JIRA)

unread,
Jan 10, 2020, 4:06:02 AM1/10/20
to jenkinsc...@googlegroups.com
Ventseslav Vatashki created an issue
 
Jenkins / Bug JENKINS-60724
Dollar sign get escaped in Jenkins Password Parameter
Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 2020-01-10 09:05
Priority: Major Major
Reporter: Ventseslav Vatashki

When you enable "This project is parameterized" option and provide Password Parameter for example with name PASS and default value Pass$$ dollar sign get escaped by Jenkins to Pass$. 

 

This is the pipeline script

 

timeout(20) {
    
   node('agent-maven-python') {
	stage('bash') {
		sh '''
                echo $PASS
                echo ''' + PASS + '''
	       '''
	}
   }
}

 

This is the output, it is missing the second $ sign. I haven't found other escaped symbols 

+ echo 'Pass$'
two$
+ echo 'Pass$'
two$
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

vvatashki@gmail.com (JIRA)

unread,
Jan 10, 2020, 4:09:02 AM1/10/20
to jenkinsc...@googlegroups.com
Ventseslav Vatashki updated an issue
Change By: Ventseslav Vatashki
When you enable "This project is parameterized" option and provide Password Parameter for example with name PASS and default value Pass$$ dollar sign get escaped by Jenkins to Pass$. 

 

This is the pipeline script

 
{code:java}

timeout(20) {
    
   node('agent-maven-python') {
stage('bash') {
  sh '''
                echo $PASS
                echo ''' + PASS + '''
        '''
}
   }
}
{code}
 

This is the output, it is missing the second $ sign. I haven't found other escaped symbols
. Jenkins version   jenkins-2.138.4
{code:java}
+ echo 'Pass$'
two Pass $
+ echo 'Pass$'
two Pass $
{code}

vvatashki@gmail.com (JIRA)

unread,
Jan 10, 2020, 4:42:02 AM1/10/20
to jenkinsc...@googlegroups.com
Ventseslav Vatashki updated an issue
When you enable "This project is parameterized" option and provide Password Parameter for example with name PASS and default value Pass$$ dollar sign get escaped by Jenkins to Pass$. 

 

This is the pipeline script

 
{code:java}
timeout(20) {
    
   node('agent-maven-python') {
stage('bash') {
  sh '''
                echo $PASS
                echo ''' + PASS + '''
        '''
}
   }
}
{code}
  This also affects simple println
{code:java}
timeout(20) {
    
node() {
stage('Sample bash') {
     println env.PASS
}
}
}
{code}
This is the output, it is missing the second $ sign. I haven't found other escaped symbols . Jenkins version jenkins-2.138.4
{code:java}
+ echo 'Pass$'
Pass$
+ echo 'Pass$'
Pass$
{code}

vvatashki@gmail.com (JIRA)

unread,
Jan 10, 2020, 5:31:02 AM1/10/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages