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

CHANGE_ variables are missing

    XMLWordPrintable

Details

    Description

      When using the GitHub Organization Folder, none of the builds have the CHANGE_* variables set.

      I have tried both sh 'env | sort' and echo "${env.CHANGE_ID}".

      I'm expecting these to be set:

      • CHANGE_ID
      • CHANGE_URL
      • CHANGE_TITLE
      • CHANGE_AUTHOR
      • CHANGE_AUTHOR_DISPLAY_NAME
      • CHANGE_AUTHOR_EMAIL
      • CHANGE_TARGET

      Attachments

        Activity

          arpiatek Andrew Piatek added a comment - - edited

          Same comment as Christian. Can this be resolved? We are not using the dead plugin but rather Blue Ocean with GitHub Branch Source plugin.

          arpiatek Andrew Piatek added a comment - - edited Same comment as Christian. Can this be resolved? We are not using the dead plugin but rather Blue Ocean with GitHub Branch Source plugin.
          amirbarkal Amir Barkal added a comment - - edited

          When configuring a multibranch pipeline repository to detect Pull Requests from GitHub, I get  the following CHANGE_* env variables populated properly:

          CHANGE_AUTHOR
          CHANGE_AUTHOR_DISPLAY_NAME
          CHANGE_BRANCH
          CHANGE_ID
          CHANGE_TARGET
          CHANGE_TITLE
          CHANGE_URL

           

          The CHANGE_AUTHOR_EMAIL var is critically missing from this list, which is paramount to alert users about regressions in their pull requests.

           

          Environment:

          Jenkins ver. 2.128 

          GitHub Branch Source Plugin 2.3.6 (latest)

          Pipeline: Multibranch 2.19 (latest)

          amirbarkal Amir Barkal added a comment - - edited When configuring a multibranch pipeline repository to detect Pull Requests from GitHub, I get  the following CHANGE_* env variables populated properly: CHANGE_AUTHOR CHANGE_AUTHOR_DISPLAY_NAME CHANGE_BRANCH CHANGE_ID CHANGE_TARGET CHANGE_TITLE CHANGE_URL   The  CHANGE_AUTHOR_EMAIL var is critically missing from this list, which is paramount to alert users about regressions in their pull requests.   Environment: Jenkins ver. 2.128  GitHub Branch Source Plugin 2.3.6 (latest) Pipeline: Multibranch 2.19 (latest)
          barathwajas Barathwaja S added a comment - - edited

          Is there any progress on this? Need some of the above env. variables to be used in a project. Any ETA on this?

           

          Ref. JENKINS-40486

          barathwajas Barathwaja S added a comment - - edited Is there any progress on this? Need some of the above env. variables to be used in a project. Any ETA on this?   Ref.  JENKINS-40486
          cortez222 Allin Cortez added a comment -

          It has been a while since any action on this page, mostly likely because it is a closed issue, but I am seeing the same problem as Amir Barkal was seeing above above. The listed CHANGE_* vars are set, but not CHANGE_AUTHOR_EMAIL.

          Environment:

          Using a multibranch job with the Branch Sources plugin using a github app for authentication.

          Jenkins 2.235.1
          GitHub API Plugin 1.114.3
          GitHub Branch Source Plugin 2.8.2
          GitHub plugin 1.30.0

          I am happy to open a separate ticket for this issue if someone suggests that.  My main reason for commenting here is to let others know that I am also seeing this problem, as it seems like if it is a valid problem, then it ought to affect many people.

          FWIW for now, I am planning on working around the issue by simply examining the email address belonging to the author of the most recent git revision on the PR branch.  However don't be mislead... I don't believe this solution is equivalent to what we should expect from CHANGE_AUTHOR_EMAIL, as I believe that email address ought to be whatever email address the PR author has set up in Github, which is not necessarily the same as the author of the most recent commit on the PR branch.

          I will also note that I am migrating from Bitbucket to Github, and the Bitbucket plugin does provide CHANGE_AUTHOR_EMAIL, so we should aim for feature parity here also.

           

          cortez222 Allin Cortez added a comment - It has been a while since any action on this page, mostly likely because it is a closed issue, but I am seeing the same problem as Amir Barkal was seeing above above. The listed CHANGE_* vars are set, but not CHANGE_AUTHOR_EMAIL. Environment: Using a multibranch job with the Branch Sources plugin using a github app for authentication. Jenkins 2.235.1 GitHub API Plugin 1.114.3 GitHub Branch Source Plugin 2.8.2 GitHub plugin 1.30.0 I am happy to open a separate ticket for this issue if someone suggests that.  My main reason for commenting here is to let others know that I am also seeing this problem, as it seems like if it is a valid problem, then it ought to affect many people. FWIW for now, I am planning on working around the issue by simply examining the email address belonging to the author of the most recent git revision on the PR branch.  However don't be mislead... I don't believe this solution is equivalent to what we should expect from CHANGE_AUTHOR_EMAIL, as I believe that email address ought to be whatever email address the PR author has set up in Github, which is not necessarily the same as the author of the most recent commit on the PR branch. I will also note that I am migrating from Bitbucket to Github, and the Bitbucket plugin does provide CHANGE_AUTHOR_EMAIL, so we should aim for feature parity here also.  
          kivagant Eugene G added a comment -

          Same issue. env.CHANGE_AUTHOR does exist but env.CHANGE_AUTHOR_EMAIL is empty.

          Jenkins ver. 2.204.2
          GitHub plugin 1.29.4
          GitHub API 1.110
          GitHub Branch Source 2.6.0
          GitHub Organization Folder Plugin 1.6

          kivagant Eugene G added a comment - Same issue. env.CHANGE_AUTHOR does exist but env.CHANGE_AUTHOR_EMAIL is empty. Jenkins ver. 2.204.2 GitHub plugin 1.29.4 GitHub API 1.110 GitHub Branch Source 2.6.0 GitHub Organization Folder Plugin 1.6

          People

            kohsuke Kohsuke Kawaguchi
            docwhat Christian Höltje
            Votes:
            2 Vote for this issue
            Watchers:
            16 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: