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

Jenkins does not find new projects in Bitbucket

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Not A Defect
    • None
    • Jenkins 2.303.3
      Bitbucket Plugin 1.1.29
      Bitbucket Branch Source Plugin 2.9.11

    Description

      We are using Jenkins and Bitbucket. In every Project that we want to build automatically we have a webhook defined in Bitbucket that notifies Jenkins. For most of our projects this works fine but I realized that new projects are not found (yes, I added a Jenkinsfile). Jenkins just ignores the new projects. I think this might be since I updated Jenkins from 2.222.4, but I am not sure. In Bitbucket i see that the webhook was triggered and the request to Jenkins returned a 200.

      Attachments

        1. image-2021-11-16-08-45-53-335.png
          60 kB
          Amygdala
        2. Screenshot 2021-11-15 195712.png
          66 kB
          Günter Grodotzki
        3. Screenshot 2021-11-15 195815.png
          35 kB
          Günter Grodotzki

        Activity

          Did you scan your organization folder? I don't think there is an automated way (yet) to detect new repositories.

          lifeofguenter Günter Grodotzki added a comment - Did you scan your organization folder? I don't think there is an automated way (yet) to detect new repositories.
          amygdala Amygdala added a comment -

          Hi Günter

          Thank you for your answer! 

          We have a webhook in Bitbucket that notifies Jenkins when something in the project changes (e.g. push to master). Jenkins then scannes the project and builds it if a Jenkinsfile ist there. It always worked, we never had problems, also with new projects. If I want a new project built by Jenkins, I just add a Jenkinsfile and a Webhook in Bitbucket. Everything else used to work automatically. 

          How can I trigger a scan of the whole organization folder manually? 

          amygdala Amygdala added a comment - Hi Günter Thank you for your answer!  We have a webhook in Bitbucket that notifies Jenkins when something in the project changes (e.g. push to master). Jenkins then scannes the project and builds it if a Jenkinsfile ist there. It always worked, we never had problems, also with new projects. If I want a new project built by Jenkins, I just add a Jenkinsfile and a Webhook in Bitbucket. Everything else used to work automatically.  How can I trigger a scan of the whole organization folder manually? 

          amygdala there is currently no such feature on Bitbucket sadly that can notify us if a new repository has been created. The plugin has always been dependent on the "org folder" being scanned.

          You can either do it manually:

          Or ideally set an interval (but I would avoid one thats too frequent as its quite tolling towards the SCM):

          lifeofguenter Günter Grodotzki added a comment - amygdala there is currently no such feature on Bitbucket sadly that can notify us if a new repository has been created. The plugin has always been dependent on the "org folder" being scanned. You can either do it manually: Or ideally set an interval (but I would avoid one thats too frequent as its quite tolling towards the SCM):
          amygdala Amygdala added a comment -

          Thank you for your answer. However, I don't have the button for triggering the scan. 

           

          And for the intervall scanning: I already have that configured but somehow the last scan was on the october 1st. Maybe this is the actual problem... the organization folder is not scanned anymore. How do I fix that?

          amygdala Amygdala added a comment - Thank you for your answer. However, I don't have the button for triggering the scan.    And for the intervall scanning: I already have that configured but somehow the last scan was on the october 1st. Maybe this is the actual problem... the organization folder is not scanned anymore. How do I fix that?

          Can you check if this is a permission thing? That button will not be visible for all types of users.

          If the interval is not working, it might be indicated in the scan logs or jenkins logs - but generally they should work

          lifeofguenter Günter Grodotzki added a comment - Can you check if this is a permission thing? That button will not be visible for all types of users. If the interval is not working, it might be indicated in the scan logs or jenkins logs - but generally they should work

          People

            Unassigned Unassigned
            amygdala Amygdala
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: