aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerry Liao2022-10-24 03:56:25 +0000
committerPerry Liao2022-10-24 03:56:25 +0000
commit2f4fab9864a91d69d2b705430f6633bdfe7f5dd5 (patch)
treeb307a85e9e102e2972f5183069ab253e1b0abb37
parent1df988400399d3147514cf42a132141b7f5d8194 (diff)
validation should probably come first lol
-rw-r--r--entries/perryliao/fib.groovy12
1 files changed, 6 insertions, 6 deletions
diff --git a/entries/perryliao/fib.groovy b/entries/perryliao/fib.groovy
index 168913f..d625d68 100644
--- a/entries/perryliao/fib.groovy
+++ b/entries/perryliao/fib.groovy
@@ -6,19 +6,19 @@ pipeline {
}
stages {
- stage('Create Cache') {
+ stage('Validate Parameter') {
steps {
script {
- if (!fileExists("fibCache")) {
- sh 'echo "0\n1" > fibCache'
- }
+ assert params.num.isInteger()
}
}
}
- stage('Validate Parameter') {
+ stage('Create Cache') {
steps {
script {
- assert params.num.isInteger()
+ if (!fileExists("fibCache")) {
+ sh 'echo "0\n1" > fibCache'
+ }
}
}
}