Do you have the jobdsl plugin installed? On Wed, Aug 22, 2018 at 13:45 Pablo Gandulfo <pabgandu...@gmail.com> wrote:
> 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. > > terça-feira, 21 de Agosto de 2018 às 20:15:14 UTC-3, Mark Waite escreveu: >> >> Can you explain further what you mean when you say that the file was >> formatted with UTF-8? >> >> As an example, I have a scripted Pipeline Jenkinsfile >> <https://github.com/MarkEWaite/jenkins-bugs/blob/JENKINS-6203/Jenkinsfile> >> which >> includes Japanese characters and is well-behaved. I am reasonably certain >> that it is UTF-8. I have a declarative Jenkinsfile >> <https://github.com/MarkEWaite/jenkins-bugs/blob/JENKINS-52844/Jenkinsfile> >> which also includes Japanese characters and is well-behaved. >> >> Does the file you are editing use a byte-order mark to indicate that it >> is UTF-8? >> >> Is there some other technique that indicates it is a UTF-8 file? >> >> If you can provide steps to duplicate the problem, feel free to upload >> those steps to JENKINS-52844, or to create a new bug report if you believe >> that the bug you're seeing does not match JENKINS-52844. >> >> Mark Waite >> >> On Tue, Aug 21, 2018 at 2:33 PM Pablo Gandulfo <pabga...@gmail.com> >> wrote: >> >>> I got this error and invested a considerable amount of time to solve it, >>> searching on internet and trying different approaches, all of them with no >>> success. Finally, I found the cause and solve it. So, I would like to share >>> this knowledge and I hope that someone at Jenkins Developer Team document >>> this to avoid others facing the same problem. >>> >>> The cause was that the Jenkinsfile was formatted with UTF-8. That's it! >>> Firstly I was using it in ANSI, but some latin characters were appearing >>> wrongly in the log. So I changed to UTF-8 and, suddenly, every first work I >>> used in the script file (pipeline, node, def, etc.) didn't work anymore, >>> throwing the same error: "java.lang.NoSuchMethodError: No such DSL method >>> 'XXXXX' found among steps". >>> >>> I imagine that this may be the cause of JENKINS-52844 , which was opened >>> recently. So, Andrew Bayer (@abayer), I hope you see this message too. >>> >>> Regards, >>> Pablo. >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Jenkins Users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to jenkinsci-use...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/jenkinsci-users/0d435cdd-0669-4ed5-9142-bb58730bece6%40googlegroups.com >>> <https://groups.google.com/d/msgid/jenkinsci-users/0d435cdd-0669-4ed5-9142-bb58730bece6%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/5ba8ecbc-c460-4ba4-9ef3-a2188e122ec2%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/5ba8ecbc-c460-4ba4-9ef3-a2188e122ec2%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9JjLif%2BKfX48M_cGd%2BsakQMvdpgY2uLNGyWCQvMyM26LQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.