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

Scan Organization Folder not detecting code changes

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      My scan organization folder is set to execute every 1 minutes.  It runs fine but is not detecting code changes and building my changes.  If i access the configure option and make a change to the configuration, that forces a scan, and my programs build.  Worked fine in 2.79

        Attachments

        1. Jenkinsfile
          6 kB
        2. job.config.xml
          4 kB
        3. org.config.xml
          3 kB
        4. Screen Shot 2018-03-01 at 8.49.32 AM.png
          Screen Shot 2018-03-01 at 8.49.32 AM.png
          105 kB

          Activity

          kford2000 Kevin Ford created issue -
          kford2000 Kevin Ford made changes -
          Field Original Value New Value
          Component/s pipeline [ 21692 ]
          Hide
          kford2000 Kevin Ford added a comment -

          Scan organization is set to 1 min and runs every 1 min, but does not build my changes.

           This is the log

          Looking up JU/jbasetraining for branches

          Checking branch release/2.0.0 from JU/jbasetraining

                            ‘Jenkinsfile’ found

                            Met criteria

                      1 branches were processed (query completed)

           

          I did find that if I enter the configure option at the organization level, make a change to the config (any change) and save it.  It automatically starts an organizational scan with this log value

           

          Looking up JU/jbasetraining for branches

          Checking branch release/2.0.0 from JU/jbasetraining

                      ‘Jenkinsfile’ found

                      Met criteria

                1 branches were processed (query completed)

           

          Looks the same as the 1min scan above, but it also builds my changes.

           

          So for some reason, the 1min checking of the code changes at the organizational level does not detect code changes, but a save to the config at the organizational level does find the changes.

          Show
          kford2000 Kevin Ford added a comment - Scan organization is set to 1 min and runs every 1 min, but does not build my changes.  This is the log Looking up JU/jbasetraining for branches Checking branch release/2.0.0 from JU/jbasetraining                   ‘Jenkinsfile’ found                   Met criteria             1 branches were processed (query completed)   I did find that if I enter the configure option at the organization level, make a change to the config (any change) and save it.  It automatically starts an organizational scan with this log value   Looking up JU/jbasetraining for branches Checking branch release/2.0.0 from JU/jbasetraining             ‘Jenkinsfile’ found             Met criteria       1 branches were processed (query completed)   Looks the same as the 1min scan above, but it also builds my changes .   So for some reason, the 1min checking of the code changes at the organizational level does not detect code changes, but a save to the config at the organizational level does find the changes.
          markewaite Mark Waite made changes -
          Assignee Mark Waite [ markewaite ]
          markewaite Mark Waite made changes -
          Component/s scm-api-plugin [ 18054 ]
          Component/s git-plugin [ 15543 ]
          Hide
          markewaite Mark Waite added a comment -

          Kevin Ford I think others will need more information before they can assist with diagnosis. For example:

          • Which branch source plugin are you using? GitHub, Bitbucket, Gitea, or Git
          • If you're using the Git branch source, are you using modern or legacy SCM provider?
          • Are there entries in the Jenkins log which might hint why the build did not run?
          • Are there any reports in logs that you've exhausted your API limits with your git hosting provider?
          Show
          markewaite Mark Waite added a comment - Kevin Ford I think others will need more information before they can assist with diagnosis. For example: Which branch source plugin are you using? GitHub, Bitbucket, Gitea, or Git If you're using the Git branch source, are you using modern or legacy SCM provider? Are there entries in the Jenkins log which might hint why the build did not run? Are there any reports in logs that you've exhausted your API limits with your git hosting provider?
          kford2000 Kevin Ford made changes -
          Attachment Jenkinsfile [ 41632 ]
          Hide
          kford2000 Kevin Ford added a comment - - edited
          • Using Bitbucket installed on local server as well as jenkins on local server, all this worked on version 2.79, all broke when i install 3.10
          • Not sure what you are asking
          • which log files
          • attached my jenkinsfile

           

          Definitely could webex with someone to help work through this issue ^^ 

          Show
          kford2000 Kevin Ford added a comment - - edited Using Bitbucket installed on local server as well as jenkins on local server, all this worked on version 2.79, all broke when i install 3.10 Not sure what you are asking which log files attached my jenkinsfile Jenkinsfile   Definitely could webex with someone to help work through this issue ^^ 
          Hide
          markewaite Mark Waite added a comment -

          The branch source provider is defined in the multi-branch job definition. Since you were willing to upload your Jenkinsfile, could you also upload the config.xml file for the multi-branch PIpeline job? I suspect that will be needed if someone investigates it.

          I doubt very much that anyone will agree to a webex to investigate the issue. That's quite uncommon in open source projects.

          Show
          markewaite Mark Waite added a comment - The branch source provider is defined in the multi-branch job definition. Since you were willing to upload your Jenkinsfile, could you also upload the config.xml file for the multi-branch PIpeline job? I suspect that will be needed if someone investigates it. I doubt very much that anyone will agree to a webex to investigate the issue. That's quite uncommon in open source projects.
          kford2000 Kevin Ford made changes -
          Attachment org.config.xml [ 41633 ]
          kford2000 Kevin Ford made changes -
          Attachment job.config.xml [ 41634 ]
          Hide
          kford2000 Kevin Ford added a comment -

          org.config.xml - Organization level config

          job.config.xml - Job level config

           

          Show
          kford2000 Kevin Ford added a comment - org.config.xml  - Organization level config job.config.xml  - Job level config  
          Hide
          markewaite Mark Waite added a comment -

          Kevin Ford I believe the guidance from Stephen Connolly and others is that web hooks should be configured from the provider (Bitbucket in your case) to notify Jenkins when a commit is pushed, rather than checking for changes as frequently as once a minute. I think his heuristic suggested that the check for changes is a "safety" in case one of the webhooks is missed. At once a minute, it seems like you're making the check for changes into the primary way of detecting changes.

          Show
          markewaite Mark Waite added a comment - Kevin Ford I believe the guidance from Stephen Connolly and others is that web hooks should be configured from the provider (Bitbucket in your case) to notify Jenkins when a commit is pushed, rather than checking for changes as frequently as once a minute. I think his heuristic suggested that the check for changes is a "safety" in case one of the webhooks is missed. At once a minute, it seems like you're making the check for changes into the primary way of detecting changes.
          kford2000 Kevin Ford made changes -
          Hide
          kford2000 Kevin Ford added a comment -

          Tried that first on earlier versions, with errors so this approach fixed.  Trying it again and attaching the error.  Maybe i can get some direction on how to fix, no luck so far from my research.

          Show
          kford2000 Kevin Ford added a comment - Tried that first on earlier versions, with errors so this approach fixed.  Trying it again and attaching the error.  Maybe i can get some direction on how to fix, no luck so far from my research.
          Hide
          kford2000 Kevin Ford added a comment -

          In my attempts, it appears that webhooks and Bitbucket team projects do not work together.  Any advise to what i am missing????

          Show
          kford2000 Kevin Ford added a comment - In my attempts, it appears that webhooks and Bitbucket team projects do not work together.  Any advise to what i am missing????
          Hide
          markewaite Mark Waite added a comment -

          Unfortunately, I don't have any experience with Bitbucket webhooks. You might ask on the Internet Relay Chat channel or on the Jenkins Users mailing list. The number of people who read git plugin bug reports is much smaller than the number of people who read either of those channels.

          Show
          markewaite Mark Waite added a comment - Unfortunately, I don't have any experience with Bitbucket webhooks. You might ask on the Internet Relay Chat channel or on the Jenkins Users mailing list. The number of people who read git plugin bug reports is much smaller than the number of people who read either of those channels.
          Hide
          mjaggard Mat Jaggard added a comment -

          I have also upgraded and found this issue. The hooks and webhooks don't seem to work. I followed this guide but the screenshots are not the same any more so I couldn't enter the same data, and also I got an error about missing a crumb because we have CSRF protection enabled and I do not control the Jenkins server so cannot turn it off.

          Show
          mjaggard Mat Jaggard added a comment - I have also upgraded and found this issue. The hooks and webhooks don't seem to work. I followed this guide but the screenshots are not the same any more so I couldn't enter the same data, and also I got an error about missing a crumb because we have CSRF protection enabled and I do not control the Jenkins server so cannot turn it off.
          Show
          mjaggard Mat Jaggard added a comment - https://mohamicorp.atlassian.net/wiki/spaces/DOC/pages/85065729/Webhook+To+Jenkins+for+Bitbucket

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            kford2000 Kevin Ford
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: