From 6dfdbf5835996e80b23158a661ea9464de2ca79d Mon Sep 17 00:00:00 2001 From: dfeldick Date: Tue, 7 May 2024 14:05:43 -0700 Subject: [PATCH 1/3] APIGOV-27843 - allow for pre-release tags --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 24fa8ec..502f878 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -73,7 +73,7 @@ twistlock-discovery:on-schedule: - !reference [.mirror-schedule-csr-rules, rules] dependencies: [] 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/kong_discovery_agent:${LAST_TAG_VERSION} - docker pull ${IMAGE_NAME} @@ -84,7 +84,7 @@ twistlock-traceability:on-schedule: - !reference [.mirror-schedule-csr-rules, rules] dependencies: [] 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/kong_traceability_agent:${LAST_TAG_VERSION} - docker pull ${IMAGE_NAME} @@ -93,7 +93,7 @@ blackduck:on-schedule: rules: - !reference [.mirror-schedule-csr-rules, rules] before_script: - - !reference [.get-last-tag, script] + - !reference [.get-agent-last-tag, script] # overridden from csrjobs.yml because mirror repos like this one don't get merge events fortify: From 97fcc9e972422bec33e8f1c355b9576b8c2fef32 Mon Sep 17 00:00:00 2001 From: dfeldick Date: Wed, 8 May 2024 07:41:28 -0700 Subject: [PATCH 2/3] 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 502f878..bcaf7db 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -72,6 +72,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 willneed the 'v' if it exists + NO_V_RELEASE_TAG_REGEX: "^v?[0-9]{1,}\\.[0-9]{1,}\\.[0-9]{1,}$" before_script: - !reference [.get-agent-last-tag, script] - echo "Using the last tagged version ${LAST_TAG_VERSION}" @@ -83,6 +86,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 willneed the 'v' if it exists + NO_V_RELEASE_TAG_REGEX: "^v?[0-9]{1,}\\.[0-9]{1,}\\.[0-9]{1,}$" before_script: - !reference [.get-agent-last-tag, script] - echo "Using the last tagged version ${LAST_TAG_VERSION}" diff --git a/release.sh b/release.sh index 48c2c0d..8b41b39 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 abefe830e0542a7dc120cce51039a65887d48638 Mon Sep 17 00:00:00 2001 From: dfeldick Date: Wed, 8 May 2024 07:43:44 -0700 Subject: [PATCH 3/3] APIGOV-27843 - fix typo --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bcaf7db..ddddc19 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -73,7 +73,7 @@ twistlock-discovery:on-schedule: - !reference [.mirror-schedule-csr-rules, rules] dependencies: [] variables: - # need to override this variable for github agents because the tag willneed the 'v' if it exists + # 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-agent-last-tag, script] @@ -87,7 +87,7 @@ twistlock-traceability:on-schedule: - !reference [.mirror-schedule-csr-rules, rules] dependencies: [] variables: - # need to override this variable for github agents because the tag willneed the 'v' if it exists + # 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-agent-last-tag, script]