From 168911d78ff1ea97272cfab420919777170fb1f5 Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Fri, 27 Sep 2024 17:14:57 +0800 Subject: [PATCH] fix(apps/prod/tekton/configs/tasks): fix task `pingcap-get-set-release-version` for hotfix cases (#1271) Avoid route in RC build logic, like this: ![image](https://github.com/user-attachments/assets/7bad9039-1f02-4eb7-9a88-97b36b01f485) This pull request includes a small change to the `apps/prod/tekton/configs/tasks/pingcap-get-set-release-version.yaml` file. The change updates the regular expression used to filter git tags to include additional patterns. * [`apps/prod/tekton/configs/tasks/pingcap-get-set-release-version.yaml`](diffhunk://#diff-21d26239b230e9f59b49651c03f88f72918acb020b89a894985105b787ec31feL25-R25): Updated the regular expression in the `grep -vE` command to include tags with date and hash patterns. Signed-off-by: wuhuizuo Signed-off-by: wuhuizuo --- .../tekton/configs/tasks/pingcap-get-set-release-version.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/prod/tekton/configs/tasks/pingcap-get-set-release-version.yaml b/apps/prod/tekton/configs/tasks/pingcap-get-set-release-version.yaml index 6d7818100..33a0f68fa 100644 --- a/apps/prod/tekton/configs/tasks/pingcap-get-set-release-version.yaml +++ b/apps/prod/tekton/configs/tasks/pingcap-get-set-release-version.yaml @@ -22,7 +22,7 @@ spec: echo "Delete the none-standard tags" if git tag | grep -E "v[0-9]+[.][0-9]+[.][0-9]+(-(alpha|beta|fips))?$" > /dev/null; then # Only delete the none-standard tags when the repo has standard semver tags. - git tag | grep -vE "^v[0-9]+[.][0-9]+[.][0-9]+(-(alpha|beta|fips))?$" | xargs git tag -d || true + git tag | grep -vE "^v[0-9]+[.][0-9]+[.][0-9]+(-(alpha|beta|fips|202[1-9][0-1][0-9][0-3][0-9]-[0-9a-f]{7,10}))?$" | xargs git tag -d || true fi RESULT_VERSION="$(git describe --tags --always --dirty --exclude 'v20[0-9][0-9].[0-1][0-9].[0-3][0-9]*')"