0
votes

I have a pipeline job created in Jenkins and I need to create a pipeline script that displays the failure and unstable builds in developement stage. What are the steps to create this in Jenkins 2.0 or Is there any sample pipeline script

1

1 Answers

1
votes

For start just follow steps from tutorial, ex

node { 
    git url: 'https://github.com/joe_user/simple-maven-project-with-tests.git' 
    def mvnHome = tool 'M3' 
    sh "${mvnHome}/bin/mvn -B verify"
}

And you can change build status using currentBuild.result variable.