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

notifyCommit should trigger builds with trailing / defined in SCM URL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: mercurial-plugin
    • Labels:
      None
    • Environment:
      Ubuntu Jenkins 1.580.2
    • Similar Issues:

      Description

      When the SCM repository URL is configured with a trailing slash, the notifyCommit will not observe the change without it.

      Example...
      Mercurial repo is located at http://<scm root>/fooRepo
      Jenkins job is defined as http://<scm root>/fooRepo/

      notifyCommit URL call is http://<jenkins root>/mercurial/notifyCommit?url=http://<scm root>/fooRepo

      The above Jenkins Job is not triggered.

      I can call notifyCommit with the trailing slash and only the above job is triggered, no other jobs which are listening to the same repo without the trailing slash.

      Due to the large number of job authors on my team, there can be a mix of SCM URL configurations across jobs. I have just begun using the notifyCommit feature and ran across this issue. I think the target should check both URLs ending with or without a trailing slash.

        Attachments

          Activity

          Hide
          jgrant216 Jeff G added a comment -

          Thank you for the clarification on the process here Jesse.

          Show
          jgrant216 Jeff G added a comment - Thank you for the clarification on the process here Jesse.
          Hide
          stevengbrown Steven G Brown added a comment -

          Thanks for the pointers Jesse Glick, it made fixing this very easy.

          https://github.com/jenkinsci/mercurial-plugin/pull/101

          Show
          stevengbrown Steven G Brown added a comment - Thanks for the pointers Jesse Glick , it made fixing this very easy. https://github.com/jenkinsci/mercurial-plugin/pull/101
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Steven Brown
          Path:
          src/main/java/hudson/plugins/mercurial/MercurialStatus.java
          src/test/java/hudson/plugins/mercurial/MercurialStatusTest.java
          http://jenkins-ci.org/commit/mercurial-plugin/9dbcc97c6861a9cb08e64ac33dd4649fd47d0552
          Log:
          JENKINS-26762 notifyCommit: ignore trailing forward slashes when comparing URLs

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Steven Brown Path: src/main/java/hudson/plugins/mercurial/MercurialStatus.java src/test/java/hudson/plugins/mercurial/MercurialStatusTest.java http://jenkins-ci.org/commit/mercurial-plugin/9dbcc97c6861a9cb08e64ac33dd4649fd47d0552 Log: JENKINS-26762 notifyCommit: ignore trailing forward slashes when comparing URLs
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/plugins/mercurial/MercurialStatus.java
          src/test/java/hudson/plugins/mercurial/MercurialStatusTest.java
          http://jenkins-ci.org/commit/mercurial-plugin/7bb4192d288be3af9da065ac74dc2e33c2d52836
          Log:
          Merge pull request #101 from StevenGBrown/ignore-trailing-forwardslash

          JENKINS-26762 notifyCommit: ignore trailing forward slashes when comparing URLs

          Compare: https://github.com/jenkinsci/mercurial-plugin/compare/3b35fbccb597...7bb4192d288b

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/plugins/mercurial/MercurialStatus.java src/test/java/hudson/plugins/mercurial/MercurialStatusTest.java http://jenkins-ci.org/commit/mercurial-plugin/7bb4192d288be3af9da065ac74dc2e33c2d52836 Log: Merge pull request #101 from StevenGBrown/ignore-trailing-forwardslash JENKINS-26762 notifyCommit: ignore trailing forward slashes when comparing URLs Compare: https://github.com/jenkinsci/mercurial-plugin/compare/3b35fbccb597...7bb4192d288b
          Hide
          stevengbrown Steven G Brown added a comment -

          Jesse Glick Stephen Connolly Would you please make a release for these changes?

          Show
          stevengbrown Steven G Brown added a comment - Jesse Glick Stephen Connolly Would you please make a release for these changes?

            People

            • Assignee:
              stevengbrown Steven G Brown
              Reporter:
              jgrant216 Jeff G
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: