Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #89 from Axway/APIGOV-27569
Browse files Browse the repository at this point in the history
APIGOV-27569 - fix tag variable name
  • Loading branch information
dfeldick authored Mar 25, 2024
2 parents f94e273 + 6869c33 commit 85bdcdd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ 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 '^v?[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}(-.*)?$' | grep -ve '-rc\.[0-9]\+$' | grep -ve '-[0-9]\+$' | tail -1)
export LAST_TAG_VERSION=$(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))
export LAST_TAG_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))
fi

twistlock-discovery:
Expand Down Expand Up @@ -85,7 +85,7 @@ twistlock-discovery:on-schedule:
before_script:
- apk --no-cache update && apk add git
- *get-latest-tag
- export IMAGE_NAME=ghcr.io/axway/webmethods_discovery_agent:${LATEST_TAG}
- export IMAGE_NAME=ghcr.io/axway/webmethods_discovery_agent:${LAST_TAG_VERSION}
- docker pull ${IMAGE_NAME}

# twistlock-traceability:on-schedule:
Expand All @@ -96,7 +96,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:${LATEST_TAG}
# - export IMAGE_NAME=ghcr.io/axway/webmethods_traceability_agent:${LAST_TAG_VERSION}
# - docker pull ${IMAGE_NAME}

blackduck:on-schedule:
Expand All @@ -107,8 +107,8 @@ blackduck:on-schedule:
- git config --global url."ssh://[email protected]".insteadOf "https://git.ecd.axway.org"''
- git fetch
- *get-latest-tag
- echo "Checking out ${LATEST_TAG}"
- git checkout ${LATEST_TAG}
- echo "Checking out ${LAST_TAG_VERSION}"
- git checkout ${LAST_TAG_VERSION}

# overridden from csrjobs.yml because mirror repos like this one don't get merge events
fortify:
Expand Down

0 comments on commit 85bdcdd

Please sign in to comment.