Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-53671

PROJECT_NAME and BUILD_STATUS not available in triple-double quotes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None
    • Windows Server 2012
      Jenkins version 2.128

      When using triple-single-quoted strings, I can access PROJECT_NAME, BUILD_NUMBER and BUILD_STATUS using the following:

      ```$PROJECT_NAME - $BUILD_NUMBER: $BUILD_STATUS```
      

      When trying to do the same in triple-double-quotes:

      """${env.PROJECT_NAME} - ${env.BUILD_NUMBER}: ${env.BUILD_STATUS}"""  
      

      I get "null" for PROJECT_NAME and BUILD_STATUS but BUILD_NUMBER is fine.

      I tried other methods:

       

      """'${PROJECT_NAME}' - '${BUILD_NUMBER}': '${BUILD_STATUS}'"""
      and
      """$PROJECT_NAME - $BUILD_NUMBER: $BUILD_STATUS"""
      

      Those both return an error:

      No such property: PROJECT_NAME for class: groovy.lang.Binding
      

       

       

            Unassigned Unassigned
            rdecarre11 Robert Decarreau
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: