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

XMLWordPrintable

    • 1.1.19

      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]]

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

              Created:
              Updated:
              Resolved: