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

java.lang.NoSuchMethodError: No such DSL method 'pipeline' found error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Not A Defect
    • Component/s: pipeline
    • Labels:
      None
    • Similar Issues:

      Description

      I am getting the above error while running sample script on a project.I am adding that sample script :

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

      Please check and let me know

        Attachments

          Activity

          Hide
          shahzebkhan111 Shahzeb Khan added a comment - - edited

          I am facing the same issue on ver 2.19.4, On ver 2.32.3 the code works fine.

          Show
          shahzebkhan111 Shahzeb Khan added a comment - - edited I am facing the same issue on ver 2.19.4, On ver 2.32.3 the code works fine.
          Hide
          abayer Andrew Bayer added a comment -

          Looks like you don't have the Pipeline: Model Definition plugin installed.

          Show
          abayer Andrew Bayer added a comment - Looks like you don't have the Pipeline: Model Definition plugin installed.
          Hide
          yiannis_tss Yiannis H added a comment -

          still getting this error in version 2.138.1 while i try to follow the guide from here https://jenkins.io/doc/book/pipeline/getting-started/

          Show
          yiannis_tss Yiannis H added a comment - still getting this error in version 2.138.1 while i try to follow the guide from here  https://jenkins.io/doc/book/pipeline/getting-started/
          Hide
          daytonpa Patrick Dayton added a comment -

          Also have the same issue.  Following the guide still results in weird errors.

          Error:
          java.lang.NoSuchMethodError: No such DSL method 'stage' found among steps

          Using Jenkins 2.138.3 on Ubuntu 16.04

          Show
          daytonpa Patrick Dayton added a comment - Also have the same issue.  Following the guide still results in weird errors. Error: java.lang.NoSuchMethodError: No such DSL method 'stage' found among steps Using Jenkins 2.138.3 on Ubuntu 16.04

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            g_harish_333 harish guntha
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: