another attempte to running the blasted if

This commit is contained in:
Hyatt 2022-06-15 12:45:19 -05:00
parent e9de8d3aaf
commit a1b6f3d9f7
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

@ -67,6 +67,17 @@ pipeline {
""",
returnStdout: true
).trim()
if (k8slensVersion ==~ 'refs\\/tags\\/([5-9]|[0-9]{2,})\\.[0-9]+\\.[0-9]+$') {
if (k8slensVersion ==~ 'refs\\/tags\\/5\\.5\\.[0-9]+$') {
echo "Version (${k8slensVersion}) is valid, we will build it with node 14."
jsNodeID = 'node-14'
} else if (k8slensVersion ==~ 'refs\\/tags\\/5\\.6\\.[0-9]+$') {
echo "Version (${k8slensVersion}) is valid, we will build it with node 16."
jsNodeID = 'node-16'
}
echo "Version (${k8slensVersion}) is not valid, we will not build it."
skipBuild = false
}
}
}
}
@ -75,17 +86,6 @@ pipeline {
stage('Pull K8S Lens Source Code') {
when {
expression {
if (k8slensVersion ==~ 'refs\\/tags\\/([5-9]|[0-9]{2,})\\.[0-9]+\\.[0-9]+$') {
if (k8slensVersion ==~ 'refs\\/tags\\/5\\.5\\.[0-9]+$') {
echo "Version (${k8slensVersion}) is valid, we will build it with node 14."
jsNodeID = 'node-14'
} else if (k8slensVersion ==~ 'refs\\/tags\\/5\\.6\\.[0-9]+$') {
echo "Version (${k8slensVersion}) is valid, we will build it with node 16."
jsNodeID = 'node-16'
}
echo "Version (${k8slensVersion}) is not valid, we will not build it."
skipBuild = false
}
return skipBuild
}
}