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

Jenkins does not recognize "Jenkinsfile"

    Details

    • Similar Issues:

      Description

      After setting up my master jenkins on linux and a slave agent on windows.
      I want to use blue ocean to setup my jenkinsfile and perform my builds.
      However, although I have a Jenkinsfile in my repository, it will not be recognized.
      I get following message:

      You don't have any branches that contain a Jenkinsfile
      
      A Jenkinsfile is defined in your repository and describes how your pipeline will work.
      

      Here my Jenkinsfile

      pipeline {
        agent any
        stages {
          stage('Cmake configure') {
            steps {
              echo 'Hello World'
            }
          }
        }
      }
      

      What can I do to fix this?

      I am connected to a local bitbucket server.
      I followed this tutorial here: https://jenkins.io/doc/book/blueocean/getting-started/
      What I found strange, that I do not need to setup a webhook in bitbucket or exchange any ssh keys. At least nothing is mentioned in the tutorial.
      The connection is made via: JNLP agent on windows.
      It is a multibranch pipeline.

        Attachments

          Activity

          Hide
          zack Zack Snyder added a comment -

          Maybe I cannot access the repository? Is there a way to test this?

          Show
          zack Zack Snyder added a comment - Maybe I cannot access the repository? Is there a way to test this?
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Which SCM do you use?

          Show
          oleg_nenashev Oleg Nenashev added a comment - Which SCM do you use?
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Whatever happens, it is unlikely related to agents. Multi-branch Pipeline repo polling happens on master and does not utilize agents

          Show
          oleg_nenashev Oleg Nenashev added a comment - Whatever happens, it is unlikely related to agents. Multi-branch Pipeline repo polling happens on master and does not utilize agents
          Hide
          zack Zack Snyder added a comment -

          The problem was happening, because I disable the master agent (where jenkins) is running.

          It was for me unclear, that I cannot disable this agent, otherwise not build will be performed.

          Show
          zack Zack Snyder added a comment - The problem was happening, because I disable the master agent (where jenkins) is running. It was for me unclear, that I cannot disable this agent, otherwise not build will be performed.
          Hide
          jglick Jesse Glick added a comment -

          Whatever configuration change you made might have suppressed the bug for the moment, but that is not an explanation. It is normal (and in fact strongly recommended) for there to be zero executors configured on the master node.

          Probably should be closed as unreproducible unless steps are posted to reproduce in a clean environment.

          Show
          jglick Jesse Glick added a comment - Whatever configuration change you made might have suppressed the bug for the moment, but that is not an explanation. It is normal (and in fact strongly recommended) for there to be zero executors configured on the master node. Probably should be closed as unreproducible unless steps are posted to reproduce in a clean environment.
          Hide
          abayer Andrew Bayer added a comment -

          Yeah, closing this as unreproducible - if you can reproduce it, please reopen and attach your jenkins.log, maybe?

          Show
          abayer Andrew Bayer added a comment - Yeah, closing this as unreproducible - if you can reproduce it, please reopen and attach your jenkins.log, maybe?
          Hide
          zack Zack Snyder added a comment -

          What steps do you want me to write down?
          I setup jenkins in a clean environment. So the bug can be easily reproduced.
          Have one master on linux and one slave on windows. Add a repository, without jenkinsfile.
          Disable master agent. Then add the jenkinsfile to the repository. No jenkinsfile will be found.

          Show
          zack Zack Snyder added a comment - What steps do you want me to write down? I setup jenkins in a clean environment. So the bug can be easily reproduced. Have one master on linux and one slave on windows. Add a repository, without jenkinsfile. Disable master agent. Then add the jenkinsfile to the repository. No jenkinsfile will be found.

            People

            • Assignee:
              Unassigned
              Reporter:
              zack Zack Snyder
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: