From dfc83bf720f5e64c6fa5fddc54483b4c41fe6153 Mon Sep 17 00:00:00 2001 From: dfeldick Date: Tue, 29 Aug 2023 07:51:09 -0700 Subject: [PATCH 1/3] APIGOV-00000 - debug --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index defe6f9..1db2d71 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,6 +82,7 @@ twistlock-discovery:on-schedule: - !reference [.mirror-schedule-csr-rules, rules] dependencies: [] before_script: + - set -x - apk --no-cache update && apk add git - *get-latest-tag - export IMAGE_NAME=ghcr.io/axway/webmethods_discovery_agent:${GIT_TAG_PREFIX}${LATEST_TAG} From 5e1eb44b48e9a2df8e4a2165f5eb0a77aa68d31c Mon Sep 17 00:00:00 2001 From: dfeldick Date: Tue, 29 Aug 2023 07:59:26 -0700 Subject: [PATCH 2/3] APIGOV-00000 - fix latest-tag --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1db2d71..0743d2b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -53,7 +53,7 @@ include: .get-latest-tag: &get-latest-tag | if [ $(git --version | grep -Eo '2.*') ]; then - export LATEST_TAG=$(git tag -l --sort="version:refname" | grep -Eo '[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,3}$' | tail -1) + export LATEST_TAG=$(git tag -l --sort="version:refname" | grep -Eo '^v?[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}(-.*)?$' | grep -ve '-rc\.[0-9]\+$' | grep -ve '-[0-9]\+$' | tail -1) else export LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) fi From df5cb3325d86e7893152ca09af6728fd5bead66f Mon Sep 17 00:00:00 2001 From: dfeldick Date: Tue, 29 Aug 2023 08:23:17 -0700 Subject: [PATCH 3/3] APIGOV-00000 - get rid of tag prefix stuff --- .gitlab-ci.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0743d2b..a2c2259 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,8 +14,6 @@ variables: WS_PROJECT_ID: "agents-webmethods" WS_CONFIG_FILE: "whitesource.config" - GIT_TAG_PREFIX: v - # just to be sure we don't do vendoring GOFLAGS: "-mod=mod" @@ -82,10 +80,9 @@ twistlock-discovery:on-schedule: - !reference [.mirror-schedule-csr-rules, rules] dependencies: [] before_script: - - set -x - apk --no-cache update && apk add git - *get-latest-tag - - export IMAGE_NAME=ghcr.io/axway/webmethods_discovery_agent:${GIT_TAG_PREFIX}${LATEST_TAG} + - export IMAGE_NAME=ghcr.io/axway/webmethods_discovery_agent:${LATEST_TAG} - docker pull ${IMAGE_NAME} # twistlock-traceability:on-schedule: @@ -96,7 +93,7 @@ twistlock-discovery:on-schedule: # before_script: # - apk --no-cache update && apk add git # - *get-latest-tag -# - export IMAGE_NAME=ghcr.io/axway/webmethods_traceability_agent:${GIT_TAG_PREFIX}${LATEST_TAG} +# - export IMAGE_NAME=ghcr.io/axway/webmethods_traceability_agent:${LATEST_TAG} # - docker pull ${IMAGE_NAME} whitesource:on-schedule: @@ -108,8 +105,8 @@ whitesource:on-schedule: - git config --global url."ssh://git@git.ecd.axway.org".insteadOf "https://git.ecd.axway.org"'' - git fetch - *get-latest-tag - - echo "Checking out ${GIT_TAG_PREFIX}${LATEST_TAG}" - - git checkout ${GIT_TAG_PREFIX}${LATEST_TAG} + - echo "Checking out ${LATEST_TAG}" + - git checkout ${LATEST_TAG} # overridden from csrjobs.yml because mirror repos like this one don't get merge events fortify: