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

Extend GitChangeSet to get the repository name

    XMLWordPrintable

Details

    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

            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.

            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.
            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().

            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() .
            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. 

            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

              Unassigned Unassigned
              webventil Arne Tempelhof
              Votes:
              13 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated: