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

Cannot access environment variable from parameterized plugin in pipeline checkout

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • workflow-job-plugin
    • None
    • Jenkins v1.639, Pipeline 2.2, Environment Injector Plugin 1.92.1

      I have a pipeline job set up as such:

      • "This build is parameterized" with a "PRODUCT_CONFIG_BRANCH" string parameter
      • "Pipeline script from SCM" with branch specifier `refs/heads/$PRODUCT_CONFIG_BRANCH`
        When I run the build, it never seems to read the $PRODUCT_CONFIG_BRANCH variable.

      If I set the variable in the Properties Content section, it uses this. However, I'd prefer to be able to easily set it every time I click Build.

          [JENKINS-36411] Cannot access environment variable from parameterized plugin in pipeline checkout

          malcolm crum created issue -
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 173116 ] New: JNJira + In-Review [ 184947 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Wayne Warren made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          subbarao p made changes -
          Description Original: I have a pipeline job set up as such:

          * "This build is parameterized" with a "PRODUCT_CONFIG_BRANCH" string parameter
          * "Pipeline script from SCM" with branch specifier `refs/heads/$PRODUCT_CONFIG_BRANCH`

          When I run the build, it never seems to read the $PRODUCT_CONFIG_BRANCH variable.

          If I set the variable in the Properties Content section, it uses this. However, I'd prefer to be able to easily set it every time I click Build.
          New: I have a pipeline job set up as such:

          * "This build is parameterized" with a "PRODUCT_CONFIG_BRANCH" string parameter
          * "Pipeline script from SCM" with branch specifier `refs/heads/$PRODUCT_CONFIG_BRANCH`
          When I run the build, it never seems to read the $PRODUCT_CONFIG_BRANCH variable.

          If I set the variable in the Properties Content section, it uses this. However, I'd prefer to be able to easily set it every time I click Build.
          Oleg Nenashev made changes -
          Component/s Original: envinject-plugin [ 15893 ]
          Oleg Nenashev made changes -
          Assignee Original: Oleg Nenashev [ oleg_nenashev ]
          Andrew Bayer made changes -
          Component/s New: workflow-job-plugin [ 21716 ]
          Component/s Original: pipeline [ 21692 ]
          Andrew Bayer made changes -
          Link New: This issue duplicates JENKINS-42971 [ JENKINS-42971 ]
          Andrew Bayer made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            crummy malcolm crum
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: