Hi Mr. Mark Waite,
Maybe there is another issue related to this problem, related to countries using latin encoding as standard (I'm from Brazil).
I didn't use any special byte-order mark. These are the steps needed to reproduce the error:
1) Choose a very simple jenkinsfile:
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Building..'
}
}
stage('Test') {
steps {
echo 'Testing..'
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
}
}
2) Create it with Notepad++, choose UTF-8 encoding, save it and commit/push to a Git branch;
3) From a Pipeline Job at Jenkins, configure it to retrieve that branch and run the jenkinsfile;
4) Launch the job. It will complain about "java.lang.NoSuchMethodError: No such DSL method 'pipeline' found among steps".
Note: whatever command you choose in the jenkinsfile as the first one (node, stage, etc.), all of them will throw the same error;
5) At Notepad++, now change to ANSI encoding, save it and commit/push to Git;
6) Launch the same job. It will run with success.
Regards,
Pablo.