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

Jenkinsfile not found in PR on GitHub -- Does not meet criteria

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • None
    • Jenkins ver. 2.138.2

      Sometimes, when we create PR on GitHub - it is ignored by Jenkins. I've tried to re-scan organization - and see in logs:

        Getting remote pull requests...
      
          Checking pull request #128
            ‘Jenkinsfile’ not found
          Does not meet criteria
      

      But Jenkinsfile is here! I see other bugs in your Jira and here is some additional information:

      • Repository is added to Jenkins via GitHub Organization Folder
      • We don't use forks
      • Commiter is a member of our organization and has full rights on this repository
      • Problem PRs are also very simple and doesn't touch Jenkinsfile at all
      • Source PR branch has Jenkinsfile
      • Branch which we want to merge - was created from source branch and also has Jenkinsfile
      • Jenkinsfile was not changed between merge commits
      • If I merge branches manually - result has Jenkinsfile
      • If we do merge on GitHub UI - result will have Jenkinsfile (and will be built)
      • If we recreate same pull request several times - it will be built

      And more logs:

      Examining our-organization/our-repo:  
      
      Checking branches...  
      Getting remote branches...  
        
      Checking branch master
            ‘Jenkinsfile’ found
          Met criteria
      No changes detected: master (still at 923197f48be5cd8296b8ca95bd72a4a830a474f4)    
      
      Checking branch develop
            ‘Jenkinsfile’ found
          Met criteria
      No changes detected: develop (still at 43c2cce36623a4af90b28d886dfb28ea8d813ab8)    
      
      Checking branch feature/198-video-verification
            ‘Jenkinsfile’ found
          Met criteria
      No changes detected: feature/198-video-verification (still at 9126f0c6958db3c712078ed0d2587e96004d27c6)  
      
      3 branches were processed  
      
      Checking pull-requests...  
      Getting remote pull requests...    
      
      Checking pull request #128
            ‘Jenkinsfile’ not found
          Does not meet criteria
      

      PR #128 - is between develop and feature/198-video-verification - and, as you can see, both have Jenkinsfile and were built successfully.

          [JENKINS-54126] Jenkinsfile not found in PR on GitHub -- Does not meet criteria

          Aleksey Smyrnov created issue -
          Aleksey Smyrnov made changes -
          Description Original: Sometimes, when we create PR on GitHub - it is ignored by Jenkins. I've tried to re-scan organization - and see in logs:
          {code:java}
            Getting remote pull requests...

              Checking pull request #128
                ‘Jenkinsfile’ not found
              Does not meet criteria
          {code}
          But Jenkinsfile is here! I see other bugs in your Jira and here is some additional information:
           * Repository is added to Jenkins via GitHub Organization Folder
           * We don't use forks
           * Commiter is a member of our organization and has full rights on this repository
           * Problem PRs are also very simple and doesn't touch Jenkinsfile at all
           * Source PR branch has Jenkinsfile
           * Branch which we want to merge - was created from source branch and also has Jenkinsfile
           * Jenkinsfile was not changed between merge commits
           * If I merge branches manually - result has Jenkinsfile
           * If we do merge on GitHub UI - result will have Jenkinsfile (and will be built)
           * If we recreate same pull request several times - it will be built

          And more logs:
          {code:java}
          Examining our-organization/our-repo: Checking branches... Getting remote branches... Checking branch master
                ‘Jenkinsfile’ found
              Met criteria
          No changes detected: master (still at 923197f48be5cd8296b8ca95bd72a4a830a474f4) Checking branch develop
                ‘Jenkinsfile’ found
              Met criteria
          No changes detected: develop (still at 43c2cce36623a4af90b28d886dfb28ea8d813ab8) Checking branch feature/198-video-verification
                ‘Jenkinsfile’ found
              Met criteria
          No changes detected: feature/198-video-verification (still at 9126f0c6958db3c712078ed0d2587e96004d27c6) 3 branches were processed Checking pull-requests... Getting remote pull requests... Checking pull request #128
                ‘Jenkinsfile’ not found
              Does not meet criteria
          {code}
          PR #128 - is between develop and feature/198-video-verification - and, as you can see, both have Jenkinsfile and were built successfully.
          New: Sometimes, when we create PR on GitHub - it is ignored by Jenkins. I've tried to re-scan organization - and see in logs:
          {code:java}
            Getting remote pull requests...

              Checking pull request #128
                ‘Jenkinsfile’ not found
              Does not meet criteria
          {code}
          But Jenkinsfile is here! I see other bugs in your Jira and here is some additional information:
           * Repository is added to Jenkins via GitHub Organization Folder
           * We don't use forks
           * Commiter is a member of our organization and has full rights on this repository
           * Problem PRs are also very simple and doesn't touch Jenkinsfile at all
           * Source PR branch has Jenkinsfile
           * Branch which we want to merge - was created from source branch and also has Jenkinsfile
           * Jenkinsfile was not changed between merge commits
           * If I merge branches manually - result has Jenkinsfile
           * If we do merge on GitHub UI - result will have Jenkinsfile (and will be built)
           * If we recreate same pull request several times - it will be built

          And more logs:
          {code:java}
          Examining our-organization/our-repo:

          Checking branches...
          Getting remote branches...
            
          Checking branch master
                ‘Jenkinsfile’ found
              Met criteria
          No changes detected: master (still at 923197f48be5cd8296b8ca95bd72a4a830a474f4)

          Checking branch develop
                ‘Jenkinsfile’ found
              Met criteria
          No changes detected: develop (still at 43c2cce36623a4af90b28d886dfb28ea8d813ab8)

          Checking branch feature/198-video-verification
                ‘Jenkinsfile’ found
              Met criteria
          No changes detected: feature/198-video-verification (still at 9126f0c6958db3c712078ed0d2587e96004d27c6)

          3 branches were processed

          Checking pull-requests...
          Getting remote pull requests...

          Checking pull request #128
                ‘Jenkinsfile’ not found
              Does not meet criteria
          {code}
          PR #128 - is between develop and feature/198-video-verification - and, as you can see, both have Jenkinsfile and were built successfully.

          Today my colleague has faced same problem in another organization/repo.

          Aleksey Smyrnov added a comment - Today my colleague has faced same problem in another organization/repo.

          Jesse Scott added a comment -

          soar We had a similar issue and we were able to workaround the specific issue by deleting the contents of:

          /var/lib/jenkins/org.jenkinsci.plugins.github_branch_source.GitHubSCMProbe.cache 

          On our Jenkins server. We have not yet identified the underlying cause however.

          Jesse Scott added a comment - soar We had a similar issue and we were able to workaround the specific issue by deleting the contents of: /var/lib/jenkins/org.jenkinsci.plugins.github_branch_source.GitHubSCMProbe.cache  On our Jenkins server. We have not yet identified the underlying cause however.

          Looks like working branch rebasing causes this issue

          Aleksey Smyrnov added a comment - Looks like working branch rebasing causes this issue

          I am also experiencing this issue.

          Joseph Collard added a comment - I am also experiencing this issue.

          Jon Tancer added a comment - - edited

          Same issue here.  This is starting to happen more frequently and is becoming a nuisance.

          As scotje suggested, clearing the contents of $jenkins_home/org.jenkinsci.plugins.github_branch_source.GitHubSCMProbe.cache and triggering a rescan of the repository temporarily resolved the issue.

          Jon Tancer added a comment - - edited Same issue here.  This is starting to happen more frequently and is becoming a nuisance. As scotje  suggested, clearing the contents of $jenkins_home/org.jenkinsci.plugins.github_branch_source.GitHubSCMProbe.cache and triggering a rescan of the repository temporarily resolved the issue.

          Jason Waldrip added a comment -

          Same issue. Causing a lot of developer frustration on the team.

          Jason Waldrip added a comment - Same issue. Causing a lot of developer frustration on the team.

          Jon Tancer added a comment -

          @soar It seems rebasing the working branch is causing the issue for us too.

          Jon Tancer added a comment - @ soar  It seems rebasing the working branch is causing the issue for us too.

          The problem is very urgent and serious obstacle to our work. Every hour I have to clear the cache. Forced to do a job for this even

          Maybe it makes sense to raise the priority to the blocker or critical?

          Viacheslav Dubrovskyi added a comment - The problem is very urgent and serious obstacle to our work. Every hour I have to clear the cache. Forced to do a job for this even Maybe it makes sense to raise the priority to the blocker or critical?

            bitwiseman Liam Newman
            soar Aleksey Smyrnov
            Votes:
            72 Vote for this issue
            Watchers:
            101 Start watching this issue

              Created:
              Updated:
              Resolved: