How to set up Jenkins build error levels for stable/unstable

294 views
Skip to first unread message

Čamo

unread,
Apr 22, 2021, 10:38:07 AM4/22/21
to Jenkins Users

I have a Jenkins job which consists of two main build steps. First step runs the tests and the second step reruns failed steps again. First step is set up as "Execute Windows batch command" The batch file contains this code:

@echo off 
 mvn clean compile test surefire-report:report-only -B -P%testCategory% 
 exit 0

The second step is set up as "Invoke top-level Maven targets"

compile test surefire-report:report-only -B -PfailedTestCategory

What I need is to set up result as stable if second step pass although the first step contains an failed tests. Actually if the first step contains failed steps the whole build is marked as unstable although the second step pass.

Screenshot with settings is in attachment

Screenshot (1).png
Reply all
Reply to author
Forward
0 new messages