if statements need to go in a script block, who knew?

This commit is contained in:
Hyatt 2022-06-15 12:34:19 -05:00
parent 8919148947
commit 8f31713281
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

@ -69,6 +69,7 @@ pipeline {
).trim() ).trim()
} }
} }
script {
if (k8slensVersion ==~ 'refs\\/tags\\/([5-9]|[0-9]{2,})\\.[0-9]+\\.[0-9]+$') { if (k8slensVersion ==~ 'refs\\/tags\\/([5-9]|[0-9]{2,})\\.[0-9]+\\.[0-9]+$') {
if (k8slensVersion ==~ 'refs\\/tags\\/5\\.5\\.[0-9]+$') { if (k8slensVersion ==~ 'refs\\/tags\\/5\\.5\\.[0-9]+$') {
echo "Version (${k8slensVersion}) is valid, we will build it with node 14." echo "Version (${k8slensVersion}) is valid, we will build it with node 14."
@ -82,6 +83,7 @@ pipeline {
} }
} }
} }
}
stage('Pull K8S Lens Source Code') { stage('Pull K8S Lens Source Code') {
when { when {