From ad7e7df7a6395035531cfb6108e458c1cb83d6d7 Mon Sep 17 00:00:00 2001 From: dfeldick Date: Wed, 8 May 2024 07:44:06 -0700 Subject: [PATCH 1/2] APIGOV-27843 - account for pre-release tags --- .gitlab-ci.yml | 6 ++++++ release.sh | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e2c16b6..322b474 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -74,6 +74,9 @@ twistlock-discovery:on-schedule: rules: - !reference [.mirror-schedule-csr-rules, rules] dependencies: [] + variables: + # need to override this variable for github agents because the tag will need the 'v' if it exists + NO_V_RELEASE_TAG_REGEX: "^v?[0-9]{1,}\\.[0-9]{1,}\\.[0-9]{1,}$" before_script: - !reference [.get-last-tag, script] - echo "Using the last tagged version ${LAST_TAG_VERSION}" @@ -85,6 +88,9 @@ twistlock-traceability:on-schedule: rules: - !reference [.mirror-schedule-csr-rules, rules] dependencies: [] + variables: + # need to override this variable for github agents because the tag will need the 'v' if it exists + NO_V_RELEASE_TAG_REGEX: "^v?[0-9]{1,}\\.[0-9]{1,}\\.[0-9]{1,}$" before_script: - !reference [.get-last-tag, script] - echo "Using the last tagged version ${LAST_TAG_VERSION}" diff --git a/release.sh b/release.sh index 367c255..3213d90 100755 --- a/release.sh +++ b/release.sh @@ -43,6 +43,13 @@ get_sdk_version() } post_to_teams() { + # don't post if this is a pre-release tag + pat='[0-9]+\.[0-9]+\.[0-9]+-' + if [[ ${TAG} =~ $pat ]]; then + echo "This is an interim release... skipping the post to Teams" + return 0 + fi + rel_date=$(date +'%m/%d/%Y') JSON="{ \"@type\": \"MessageCard\", From 936187c34b16ea2b22423f05630f0bfa1341f443 Mon Sep 17 00:00:00 2001 From: dfeldick Date: Wed, 8 May 2024 08:13:18 -0700 Subject: [PATCH 2/2] APIGOV-27843 - change references --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 322b474..77e9c32 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,7 +78,7 @@ twistlock-discovery:on-schedule: # need to override this variable for github agents because the tag will need the 'v' if it exists NO_V_RELEASE_TAG_REGEX: "^v?[0-9]{1,}\\.[0-9]{1,}\\.[0-9]{1,}$" before_script: - - !reference [.get-last-tag, script] + - !reference [.get-agent-last-tag, script] - echo "Using the last tagged version ${LAST_TAG_VERSION}" - export IMAGE_NAME=ghcr.io/axway/apigee_discovery_agent:${LAST_TAG_VERSION} - docker pull ${IMAGE_NAME} @@ -92,7 +92,7 @@ twistlock-traceability:on-schedule: # need to override this variable for github agents because the tag will need the 'v' if it exists NO_V_RELEASE_TAG_REGEX: "^v?[0-9]{1,}\\.[0-9]{1,}\\.[0-9]{1,}$" before_script: - - !reference [.get-last-tag, script] + - !reference [.get-agent-last-tag, script] - echo "Using the last tagged version ${LAST_TAG_VERSION}" - export IMAGE_NAME=ghcr.io/axway/apigee_traceability_agent:${LAST_TAG_VERSION} - docker pull ${IMAGE_NAME} @@ -114,7 +114,7 @@ blackduck:on-schedule: rules: - !reference [.mirror-schedule-csr-rules, rules] before_script: - - !reference [.get-last-tag, script] + - !reference [.get-agent-last-tag, script] run-csr: rules: