I'm new to Jenkins pipeline, I want to know whether I can skip same steps in different jobs where one of it has finished. For example, I have tow jobs:jobA and jobB
#jobA
node("A") {
stage("1") {
echo "stage 1"
}
stage("2") {
echo "stage 2"
}
stage("3") {
echo "stage 3"
}
}
#jobB
node("B") {
stage("1") {
echo "stage 1"
}
stage("2") {
echo "stage 2"
}
stage("4") {
echo "stage 4"
}
}
jobA and jobB both have stage "1" and "2", and they are totally the same.If jobA has finished running, and then jobB begins, can jobB get the result of stage1 and stage2 from jobA and then skip them and directly going to stage "4"?