[JIRA] (JENKINS-61847) Pipeline environment 'constant' fails when in lowercase or in collision with Configuration environment 'constant'

2 views
Skip to first unread message

based@free.fr (JIRA)

unread,
Apr 8, 2020, 5:33:02 PM4/8/20
to jenkinsc...@googlegroups.com
Basile Chandesris created an issue
 
Jenkins / Bug JENKINS-61847
Pipeline environment 'constant' fails when in lowercase or in collision with Configuration environment 'constant'
Issue Type: Bug Bug
Assignee: Unassigned
Components: pipeline
Created: 2020-04-08 21:32
Environment: Redhat 7, Java 8 242, LTS 2.222.1
Labels: environment environment-variables environment-constantes
Priority: Minor Minor
Reporter: Basile Chandesris

'lower' sometime is not printed:

#!/usr/bin/env groovy
def getMyValue() { return 'MY_VALUE' }
def getJobUrl() { return env['JOB_URL'] ?: env['FOO'] }
pipeline {
    agent { node { label 'xwiki' } }
    options { skipDefaultCheckout() }
    environment {
        UPPER='UPPER'
        lower='lower'
                              
        MY_VALUE=getMyValue()
        my_value=getMyValue()
                               
        MY_JOB = getJobUrl()
        my_job = getJobUrl()
    }
    stages {
        stage('Envs UPPER and lower') {
            steps {
                sh("echo U \$UPPER")
                sh("echo l \$lower")                
                
                sh 'echo U $UPPER'
                sh 'echo l $lower'

                sh("echo M \$MY_VALUE")
                sh("echo m \$my_value") 
               
                sh 'echo M $MY_VALUE'
                sh 'echo m $my_value' 
                
                sh("echo M \$MY_JOB")
                sh("echo m \$my_job")
               
                sh 'echo M $MY_JOB'
                sh 'echo m $my_job'
            }
        }
    }
}
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

based@free.fr (JIRA)

unread,
Apr 8, 2020, 5:35:02 PM4/8/20
to jenkinsc...@googlegroups.com
Basile Chandesris updated an issue
Change By: Basile Chandesris
'lower' sometime is not printed:
{code:java}
#!/usr/bin/env groovy
{code}
Reply all
Reply to author
Forward
0 new messages