From 059a1d20b397017ca83c11c5cfcd2fd6578765fc Mon Sep 17 00:00:00 2001 From: nhyatt Date: Fri, 10 Jun 2022 11:09:44 -0500 Subject: [PATCH] corrects detection script for alpine --- build-k8s-lenz.jenkins | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/build-k8s-lenz.jenkins b/build-k8s-lenz.jenkins index 1e9aa7e..848b268 100644 --- a/build-k8s-lenz.jenkins +++ b/build-k8s-lenz.jenkins @@ -43,21 +43,20 @@ pipeline { if ! command -v git &> /dev/null; then apk add --no-cache git fi + apk add --no-cache git """ k8slensVersion = "refs/tags/" + sh ( script: """ git \ -c 'versionsort.suffix=-' \ - --exit-code \ - --refs \ - --sort='version:refname' \ - --tags \ - ls-remote ssh://git@gitea.smoothnet.org:31822/nhyatt/openlens.git 'v*.*.*' \ - | tail \ - --lines=1 \ + ls-remote https://gitea.smoothnet.org/nhyatt/openlens.git 'v*.*.*' \ | cut \ --delimiter='/' \ - --fields=3 + --fields=3 \ + | sort \ + -u \ + | tail \ + -n 1 """, returnStdout: true ).trim()