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

subversion-plugin commit notification (1.43) does not consider global node properties in SCM URLs

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      i got several jenkins-jobs which use a global node property environment variable (jenkins global config). (i need this in order to centralize parts of svnURL for several jobs, so i only need to change the property to switch many jobs to a new branch).

      the problem came up with the use of post-commit hooks:
      on commit notification there 2 steps which need to be fixed:

      • in SubversionRepositoryStatus.notifyCommit() the check if the reported change is within/beyond the jobs SCMUrl is based on ModuleLocation.getSVNURL() instead of ModuleLocation.getExpandedLocation(envVarsContainingGlobalNodePropertyEnvVars).getSVNURL()
      • and same applies to SubversionSCM.repositoryLocationsNoLongerExist(), because otherwise the scmPolling would tell "One or more repository locations do not exist anymore for {0}

        , project will be disabled."

        Attachments

          Issue Links

            Activity

            Hide
            mcklaus Klaus Azesberger added a comment -

            i provided code via pull request with following fixes:

            • doCommitNotification considers GlobalNodeProperties environment variables before checks of svnUrl
            • repositoryLocationsNoLongerExist check within scmPolling considers GlobalNodeProperties environment variables before checks of svnUrl
            • doCommitNotification does not cut the first 4 characters of SVNUrl in order to Cut the "U " from the "U /your/changed/files" string instead it cuts the first character and trims the string. this was needed for compatibility to either post-commit hook or svn-version (didnt analyze this that precisely)
            Show
            mcklaus Klaus Azesberger added a comment - i provided code via pull request with following fixes: doCommitNotification considers GlobalNodeProperties environment variables before checks of svnUrl repositoryLocationsNoLongerExist check within scmPolling considers GlobalNodeProperties environment variables before checks of svnUrl doCommitNotification does not cut the first 4 characters of SVNUrl in order to Cut the "U " from the "U /your/changed/files" string instead it cuts the first character and trims the string. this was needed for compatibility to either post-commit hook or svn-version (didnt analyze this that precisely)

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mcklaus Klaus Azesberger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: