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

Bibucket Plugin is not triggering the job because of minimal url mismatch (".*/scm/.*")

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      1.1.19

      Description

      Bitbucket Plugin is not triggering matching Jobs.

      I have added a FINE log to investigate where it hangs and I followed the source code in Github in paralel to understand the source of the problem. 

      Looks like the match method in BitbucketJobProbe returns false when it checks the url from my jenkins job with the url from the payload.

      Logs:

      Considering candidate job trigger-build-branch
      Oct 26, 2018 3:15:14 PM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
      Considering to poke trigger-build-branch
      Oct 26, 2018 3:15:14 PM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
      Trying to match [https://[host]/bitbucket/scm/[project]/[repository].git|https://[host]/scm/[project]/[repository].git]<-->[https://[host]/bitbucket/[project]/[repository|https://[host]/[project]/[repository]]
      Oct 26, 2018 3:15:14 PM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
      trigger-build-branch SCM doesnt match remote repo {1}

       

      There is a check for "/scm" before actually comparing the url but it removes the "/scm" only if it appears at the start. In my case "/scm" is somewhere inside the url. 

      [https://[host]/bitbucket*/scm*/[project]/[repository].git]

      [https://[host]/bitbucket/[project]/[repository|https://[host]/[project]/[repository]]

        Attachments

          Issue Links

            Activity

            Hide
            tzach_solomon Tzach Solomon added a comment -

            Added Override Repository URL field in 1.1.19 where you can type the URL you want to match

            Show
            tzach_solomon Tzach Solomon added a comment - Added Override Repository URL field in 1.1.19 where you can type the URL you want to match

              People

              Assignee:
              tzach_solomon Tzach Solomon
              Reporter:
              roxymur Roxana Muresan
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: