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

Extend GitChangeSet to get the repository name

    Details

    • Similar Issues:

      Description

      By using a global shared library for Pipeline jobs, rawBuild.changeSets on the current build will contain the changes of the global shared library and the repository that is used for building. To better distinguish between theses to sources, it would be great to have a variable to obtain the repository.

      The GitChangeSet class does not provide any possibility to get repository information about the commit.

          currentBuild.rawBuild.changeSets.collect { cs ->
              cs.collect { entry ->
                  "* ${entry.author.fullName}: ${entry.msg}"
              }.join("\n")
          }.join("\n")
      

        Attachments

          Issue Links

            Activity

            Hide
            philmcardlecg Phil McArdle added a comment -

            This would be a boon for us too. I don't mind having the changes, but I'd like to be able to filter them.

            Show
            philmcardlecg Phil McArdle added a comment - This would be a boon for us too. I don't mind having the changes, but I'd like to be able to filter them.
            Hide
            jglick Jesse Glick added a comment -

            currentBuild.rawBuild.changeSets is deprecated; use currentBuild.changeSets.

            Probably there should be something in the form of a map, keyed by SCM.getKey().

            Show
            jglick Jesse Glick added a comment - currentBuild.rawBuild.changeSets is deprecated; use currentBuild.changeSets . Probably there should be something in the form of a map, keyed by SCM.getKey() .
            Hide
            papoy Hans-Eric Jönsson added a comment - - edited

            This feature would be really appreciated as we would like to trigger certain actions when a specific file is changed, but since we are also using a shared-pipeline, things become a bit wonky to figure out if the change in question is in the shared-pipeline or in the repository in question, because the file-name exists in both repos. 

            Show
            papoy Hans-Eric Jönsson added a comment - - edited This feature would be really appreciated as we would like to trigger certain actions when a specific file is changed, but since we are also using a shared-pipeline, things become a bit wonky to figure out if the change in question is in the shared-pipeline or in the repository in question, because the file-name exists in both repos. 

              People

              • Assignee:
                Unassigned
                Reporter:
                webventil Arne Tempelhof
              • Votes:
                11 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated: