diff options
author | Perry Liao | 2022-10-24 03:56:25 +0000 |
---|---|---|
committer | Perry Liao | 2022-10-24 03:56:25 +0000 |
commit | 2f4fab9864a91d69d2b705430f6633bdfe7f5dd5 (patch) | |
tree | b307a85e9e102e2972f5183069ab253e1b0abb37 /entries/perryliao | |
parent | 1df988400399d3147514cf42a132141b7f5d8194 (diff) |
validation should probably come first lol
Diffstat (limited to 'entries/perryliao')
-rw-r--r-- | entries/perryliao/fib.groovy | 12 |
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' + } } } } |