i got solution
below mentioned reference link :
https://issues.jenkins-ci.org/browse/JENKINS-38793
code : node {
try {
stage('disk-check') {
bat "CALL C:\\Users\\Administrator\\Desktop\\task1"
}
} catch (Exception ex) {
}
try {
stage('disk-perm') {
bat "CALL C:\\Users\\Administrator\\Desktop\\task2"
}
} catch (Exception ex) {
}
stage('disk-read-write') {
bat "CALL C:\\Users\\Administrator\\Desktop\\task3"
}
currentBuild.result = 'FAILURE'
}
On Tue, Jun 26, 2018 at 4:34 AM, Karthikeyan U <karthi.linux.91@xxxxxxxxx>
wrote:
Dear All,
I have create 3 stages in jenkins pipeline.
stage 1
stage 2
stage 3
if stage 1 is fail ...
stage2 & stage 3 skipped due to earlier failure
Requirement: don't skip stage2 and stage3
Below mentioned sample code
pipeline {
agent any
stages { stage("disk-check") {
steps {
bat "CALL C:\\Users\\Administrator\\Desktop\\task1"
}
}
stage("disk-perm") {
steps {
bat "CALL C:\\Users\\Administrator\\
Desktop\\task2"
}
}
stage("disk-read-write") {
steps {
bat "CALL C:\\Users\\Administrator\\Desktop\\task3"
}
}
}
}
Regards & Thanks,
Karthikeyan U