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

Allow access to environment variables as Groovy variables

      People often confuse Groovy variables with environment variables and do not grasp how to access the latter from outside a forked process.

      CpsScript.getProperty ought to fall back to EnvActionImpl.getProperty as a convenience, so that you can access environment variables from a script as PROP_NAME in addition to env.PROP_NAME.

          [JENKINS-29952] Allow access to environment variables as Groovy variables

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/resources/org/jenkinsci/plugins/workflow/cps/EnvActionImpl/Binder/help.jelly
          http://jenkins-ci.org/commit/workflow-cps-plugin/35a074c683b757b90cf651a1e37f19c66eed4421
          Log:
          JENKINS-29952 Updated documentation.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/resources/org/jenkinsci/plugins/workflow/cps/EnvActionImpl/Binder/help.jelly http://jenkins-ci.org/commit/workflow-cps-plugin/35a074c683b757b90cf651a1e37f19c66eed4421 Log: JENKINS-29952 Updated documentation.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/resources/org/jenkinsci/plugins/workflow/cps/EnvActionImpl/Binder/help.jelly
          http://jenkins-ci.org/commit/workflow-cps-plugin/4c44cc253825da00d98bb72e7c4cb8ee06a4fbd1
          Log:
          Merge pull request #70 from jglick/env-help

          JENKINS-29952 Updated documentation

          Compare: https://github.com/jenkinsci/workflow-cps-plugin/compare/32c98dbbe541...4c44cc253825

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/resources/org/jenkinsci/plugins/workflow/cps/EnvActionImpl/Binder/help.jelly http://jenkins-ci.org/commit/workflow-cps-plugin/4c44cc253825da00d98bb72e7c4cb8ee06a4fbd1 Log: Merge pull request #70 from jglick/env-help JENKINS-29952 Updated documentation Compare: https://github.com/jenkinsci/workflow-cps-plugin/compare/32c98dbbe541...4c44cc253825

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/org/jenkinsci/plugins/workflow/cps/CpsScript.java
          src/main/java/org/jenkinsci/plugins/workflow/cps/CpsWhitelist.java
          src/main/java/org/jenkinsci/plugins/workflow/cps/EnvActionImpl.java
          src/test/java/org/jenkinsci/plugins/workflow/WorkflowTest.java
          http://jenkins-ci.org/commit/workflow-cps-plugin/2d71de2891c832e924b737295154fb3c6afe4c5d
          Log:
          [FIXED JENKINS-29952] Offer PROP as a shorthand for env.PROP from within Groovy code.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jenkinsci/plugins/workflow/cps/CpsScript.java src/main/java/org/jenkinsci/plugins/workflow/cps/CpsWhitelist.java src/main/java/org/jenkinsci/plugins/workflow/cps/EnvActionImpl.java src/test/java/org/jenkinsci/plugins/workflow/WorkflowTest.java http://jenkins-ci.org/commit/workflow-cps-plugin/2d71de2891c832e924b737295154fb3c6afe4c5d Log: [FIXED JENKINS-29952] Offer PROP as a shorthand for env.PROP from within Groovy code.

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            8 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: