This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX JENKINS-38017 JENKINS-37323] Implement test cases with new syntax (
#30) * [JENKINS-37323] Implement test cases with new syntax * [JENKINS-37323] adding all known pipeline syntax as test case * [JENKINS-37323] fix merge problem and make sure we returning always self and not coditional
- Loading branch information
Showing
5 changed files
with
128 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/test/resources/test_scripts/stages-with-wait-block-syntax.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
node { | ||
stage ('Stage 1'){ | ||
sh 'sleep 3; echo `date` Stage 1;' | ||
sh 'sleep 3; echo `date` Stage 1;' | ||
} | ||
stage ('Stage 2'){ | ||
parallel firstBranch: { | ||
sh 'echo `date` Stage 2 - first;sleep 3; echo `date` Stage 2 - first;sleep 3; echo `date` Stage 2 - first;' | ||
|
||
}, secondBranch: { | ||
sh 'echo `date` Stage 2 - second;sleep 3; echo `date` Stage 2 - second;sleep 3; echo `date` Stage 2 - second;' | ||
}, | ||
failFast: true | ||
} | ||
stage ('fin'){ | ||
sh 'echo `date` fin;sleep 3; echo `date` fin;' | ||
sh 'echo yeah > foo.txt' | ||
archiveArtifacts 'foo.txt' | ||
} | ||
stage 'NoSteps' | ||
} |
16 changes: 16 additions & 0 deletions
16
src/test/resources/test_scripts/stages-with-wait-pipelineModel-syntax.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
pipeline { | ||
agent label:"" | ||
stages { | ||
stage ('Stage 1'){ | ||
sh 'sleep 3; echo `date` Stage 1;' | ||
sh 'sleep 3; echo `date` Stage 1;' | ||
} | ||
|
||
stage ('fin'){ | ||
sh 'echo `date` fin;sleep 3; echo `date` fin;' | ||
sh 'echo yeah > foo.txt' | ||
archiveArtifacts 'foo.txt' | ||
} | ||
} | ||
|
||
} |