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

SCMSource is [BitbucketSCMSource] which is not supported

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hi,

      I have Bitbucket Team/Project with default configuration

      I already configured the webhook by using the guide here:  https://plugins.jenkins.io/bitbucket/
       
      But when I'm pusing code changes I can see that the jenkins got the webhook

      2021-03-07 17:37:47.044+0000 [id=258] INFO c.c.j.p.BitbucketPayloadProcessor#processWebhookPayload: Received commit hook notification for {"scm":"git","website":null,"uuid":"{c647e2e1-15a6-4d01-891c-b1b43282cae8}","links":{"self":{"href":"https://api.bitbucket.org/2.0/repositories/myorg/myservice"},"html":{"href":"https://bitbucket.org/myorg/myservice"},"avatar":{"href":"https://bytebucket.org/ravatar/%7Bc647e2e1-15a6-4d01-891c-b1b43282cae8%7D?ts=default"}},"project":{"links":{"self":{"href":"https://api.bitbucket.org/2.0/workspaces/myorg/projects/CP"},"html":{"href":"https://bitbucket.org/myorg/workspace/projects/CP"},"avatar":{"href":"https://bitbucket.org/account/user/myorg/projects/CP/avatar/32?ts=1614678995"}},"type":"project","name":"myorg Platform","key":"CP","uuid":"{09d0cc61-f823-47ec-b0e8-2edabb72cc63}"},"full_name":"myorg/myservice","owner":{"username":"myorg","display_name":"myorg","type":"team","uuid":"{664512eb-246b-41e4-9fb3-de8e2003c064}","links":{"self":{"href":"https://api.bitbucket.org/2.0/teams/%7B664512eb-246b-41e4-9fb3-de8e2003c064%7D"},"html":{"href":"https://bitbucket.org/%7B664512eb-246b-41e4-9fb3-de8e2003c064%7D/"},"avatar":{"href":"https://bitbucket.org/account/myorg/avatar/"}}},"workspace":{"slug":"myorg","type":"workspace","name":"myorg","links":{"self":{"href":"https://api.bitbucket.org/2.0/workspaces/myorg"},"html":{"href":"https://bitbucket.org/myorg/"},"avatar":{"href":"https://bitbucket.org/workspaces/myorg/avatar/?ts=1614788230"}},"uuid":"{664512eb-246b-41e4-9fb3-de8e2003c064}"},"type":"repository","is_private":true,"name":"myservice"}2021-03-07 17:37:47.044+0000 [id=258] INFO c.c.j.p.BitbucketPayloadProcessor#processWebhookPayload: Received commit hook notification for {"scm":"git","website":null,"uuid":"{c647e2e1-15a6-4d01-891c-b1b43282cae8}","links":{"self":{"href":"https://api.bitbucket.org/2.0/repositories/myorg/myservice"},"html":{"href":"https://bitbucket.org/myorg/myservice"},"avatar":{"href":"https://bytebucket.org/ravatar/%7Bc647e2e1-15a6-4d01-891c-b1b43282cae8%7D?ts=default"}},"project":{"links":{"self":{"href":"https://api.bitbucket.org/2.0/workspaces/myorg/projects/CP"},"html":{"href":"https://bitbucket.org/myorg/workspace/projects/CP"},"avatar":{"href":"https://bitbucket.org/account/user/myorg/projects/CP/avatar/32?ts=1614678995"}},"type":"project","name":"myorg Platform","key":"CP","uuid":"{09d0cc61-f823-47ec-b0e8-2edabb72cc63}"},"full_name":"myorg/myservice","owner":{"username":"myorg","display_name":"myorg","type":"team","uuid":"{664512eb-246b-41e4-9fb3-de8e2003c064}","links":{"self":{"href":"https://api.bitbucket.org/2.0/teams/%7B664512eb-246b-41e4-9fb3-de8e2003c064%7D"},"html":{"href":"https://bitbucket.org/%7B664512eb-246b-41e4-9fb3-de8e2003c064%7D/"},"avatar":{"href":"https://bitbucket.org/account/myorg/avatar/"}}},"workspace":{"slug":"myorg","type":"workspace","name":"myorg","links":{"self":{"href":"https://api.bitbucket.org/2.0/workspaces/myorg"},"html":{"href":"https://bitbucket.org/myorg/"},"avatar":{"href":"https://bitbucket.org/workspaces/myorg/avatar/?ts=1614788230"}},"uuid":"{664512eb-246b-41e4-9fb3-de8e2003c064}"},"type":"repository","is_private":true,"name":"myservice"}
      

      But the relevant job not started automatically 
       
      When I started to record the following logs

      com.cloudbees.jenkins.plugins.BitbucketHookReceiver
      com.cloudbees.jenkins.plugins.BitBucketTrigger
      com.cloudbees.jenkins.plugins.BitbucketJobProbe
      com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor
      com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource
      com.cloudbees.jenkins.plugins.bitbucket.hooks
      com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener
      

      I could see the following error log

      Considering candidate scmSourceOwner repositories » myorg » myapp
      Mar 07, 2021 6:26:22 PM FINER com.cloudbees.jenkins.plugins.BitbucketJobProbe
      Considering candidate scmSource com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource{id='com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMNavigator::https://bitbucket.org::myorg::myapp'}
      Mar 07, 2021 6:26:22 PM FINEST com.cloudbees.jenkins.plugins.BitbucketJobProbe
      SCMSource is [BitbucketSCMSource] which is not supported
      Mar 07, 2021 6:26:22 PM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
      SCM [repositories » myorg » myapp] doesn't match remote repo [https://bitbucket.org/myorg/myapp]
      Mar 07, 2021 6:26:22 PM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe

      not working also for Multibranch Pipeline

      I couldn't find any solution here: https://issues.jenkins.io/browse/JENKINS-63848

        Attachments

          Issue Links

            Activity

            Hide
            tk35c Cosimo Damiano Prete added a comment -

            Hi Tzach Solomon.
            I can easily understand the design decision behind it, but can't you implement a pragmatic approach either?
            For example: if the class is available on the classpath then you proceed with the logic through reflection (I know, it's very ugly and potentially breaking if not handled correctly).

            It's really a pity that you can scan and automatically create jobs for your organization, but then you cannot trigger them...

            Show
            tk35c Cosimo Damiano Prete added a comment - Hi Tzach Solomon . I can easily understand the design decision behind it, but can't you implement a pragmatic approach either? For example: if the class is available on the classpath then you proceed with the logic through reflection (I know, it's very ugly and potentially breaking if not handled correctly). It's really a pity that you can scan and automatically create jobs for your organization, but then you cannot trigger them...
            Hide
            tzach_solomon Tzach Solomon added a comment - - edited

            Cosimo Damiano Prete

            1. I'm sorry you feel this, I truly am. You need to understand I'm NOT an employee of Atlasssian, I just maintain the plugin on my free time and if Atlasssian chose to create a separate plugin, I believe it was with a good cause.
            2. As for reflection, one does not simply do Java reflection. It has it's downsides (and risks) and in a major critical application such as Jenkins, I believe it's not a risk worth taking
            Show
            tzach_solomon Tzach Solomon added a comment - - edited Cosimo Damiano Prete I'm sorry you feel this, I truly am. You need to understand I'm NOT an employee of Atlasssian, I just maintain the plugin on my free time and if Atlasssian chose to create a separate plugin, I believe it was with a good cause. As for reflection, one does not simply do Java reflection. It has it's downsides (and risks) and in a major critical application such as Jenkins, I believe it's not a risk worth taking
            Hide
            tk35c Cosimo Damiano Prete added a comment - - edited

            Hi Tzach Solomon.
            What about adding the Atlassian's plugin as provided ranged dependency and do the logic only if the Jar is there? In this way the only reflection would be a Class.forName(...) (to check if the classes are available) and then you could use the real classes.
            Would it be implementable in your opinion? If it's an acceptable solution for you, I can maybe submit a PR.

            Show
            tk35c Cosimo Damiano Prete added a comment - - edited Hi Tzach Solomon . What about adding the Atlassian's plugin as provided ranged dependency and do the logic only if the Jar is there? In this way the only reflection would be a Class.forName(...) (to check if the classes are available) and then you could use the real classes. Would it be implementable in your opinion? If it's an acceptable solution for you, I can maybe submit a PR.
            Hide
            tzach_solomon Tzach Solomon added a comment - - edited

            Cosimo Damiano Prete I'm sorry but I won't start doing reflection on a plugin that supposed to be simple and do one simple thing

            Show
            tzach_solomon Tzach Solomon added a comment - - edited Cosimo Damiano Prete  I'm sorry but I won't start doing reflection on a plugin that supposed to be simple and do one simple thing
            Hide
            tk35c Cosimo Damiano Prete added a comment -

            Tzach Solomon fair enough. I'll check with my team how to proceed then.

            Thank you

            Show
            tk35c Cosimo Damiano Prete added a comment - Tzach Solomon  fair enough. I'll check with my team how to proceed then. Thank you

              People

              Assignee:
              tzach_solomon Tzach Solomon
              Reporter:
              dordor dor s
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: