diff --git a/build-k8s-lenz.jenkins b/build-k8s-lenz.jenkins index 394c2d8..89e0827 100644 --- a/build-k8s-lenz.jenkins +++ b/build-k8s-lenz.jenkins @@ -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 } }