Pipeline editor unable to open Jenkinsfile in Jenk

2019-08-04 13:07发布

问题:

I am extremely new to BlueOcean and am getting the below error when trying to open the pipeline editor:

There was an error loading the pipeline from the Jenkinsfile in this repository. Correct the error by editing the Jenkinsfile using the declarative syntax then commit it back to the repository.

Cannot read property 'indexOf' of undefined

Jenkinsfile:

pipeline {
   agent any

   stages {
      stage('Build') {
        steps {
            echo 'Building..'
        }
    }
    stage('Test') {
        steps {
            echo 'Testing..'
        }
    }
    stage('Deploy') {
        steps {
            echo 'Deploying....'
        }
     }
  }
}

Error screenshot -