| I could reproduce this with a simple Jenkinsfile that just contains "echo 'Hello-World!'". See attached file Jenkinsfile . Steps to reproduce
- Add the attached Jenkinsfile to a GIT repo.
- Create a Pipeline Job.
- Set Definition to "Pipeline script from SCM".
- Set "SCM "to "Git", configure the repository and point "Script Path" to the Jenkinsfile.
If the file has a UTF-8-BOM, the Job fails with
java.lang.NoSuchMethodError: No such DSL method 'echo' found among steps [archive, bat, ... zip] or globals [currentBuild, docker, env, params, pipeline, scm]
Remove the BOM, check in, push and the job will run as expected. |