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

            roxymur Roxana Muresan created issue -
            roxymur Roxana Muresan made changes -
            Field Original Value New Value
            Link This issue blocks JENKINS-49177 [ JENKINS-49177 ]
            roxymur Roxana Muresan made changes -
            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]/scm/[project]/[repository].git<-->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]*/scm*/[project]/[repository].git]

            https://[host]/[project]/[repository]
            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]]
            torstenreinhard Torsten Reinhard made changes -
            Link This issue relates to JENKINS-59447 [ JENKINS-59447 ]
            tzach_solomon Tzach Solomon made changes -
            Assignee Roxana Muresan [ roxymur ] Tzach Solomon [ tzach_solomon ]
            tzach_solomon Tzach Solomon made changes -
            Released As 1.1.19
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Fixed but Unreleased [ 10203 ]
            tzach_solomon Tzach Solomon made changes -
            Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]

              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: