2
votes

I'm a noob in Jenkins Pipeline trying to convert a bunch of DSL Flow (Deprecated from Jenkins 2.x) type jobs to Pipeline type Jobs. as a first step I'm using the Job itself code field to insert my script. I started with a very basic example but I get a message on the job description that the script doesn't have stages although it does.

This Pipeline has run successfully, but does not define any stages. Please use the stage step to define some stages in this Pipeline.

the script:

pipeline {
    agent {
        label 'master'
    }
    stages {
        stage('Build') {
            steps{
                echo 'mvn install'
            }
        }
    }
}

screenshot for reference: enter image description here

any help is appreciated :)

1

1 Answers

2
votes

It seems updating pipeline plugins resolved the issue.