From d24a5a143716253902c3909ee9246e4190a28516 Mon Sep 17 00:00:00 2001 From: chanwook-lee <108053113+chanwook-lee@users.noreply.github.com> Date: Thu, 11 Jan 2024 19:18:47 +0900 Subject: [PATCH] =?UTF-8?q?[mod]=20ic=EC=9D=98=20target=20branch=EC=97=90?= =?UTF-8?q?=20*^=3F=20=EB=AC=B8=EC=9E=90=EA=B0=80=20=ED=8F=AC=ED=95=A8?= =?UTF-8?q?=EB=90=9C=20=EA=B2=BD=EC=9A=B0=20=EC=A0=95=EA=B7=9C=ED=91=9C?= =?UTF-8?q?=ED=98=84=EC=8B=9D=EC=9C=BC=EB=A1=9C=20=EB=A7=A4=EC=B9=AD?= =?UTF-8?q?=EB=90=98=EB=8A=94=20=EB=B8=8C=EB=9E=9C=EC=B9=98=EB=A5=BC=20?= =?UTF-8?q?=EB=8F=99=EC=9E=91=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95=20(#406)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- config/release.yaml | 8 ++++---- pkg/dispatcher/dispatcher.go | 11 ++++++++++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 47cbd83..82058a2 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Current Operator version -VERSION ?= v0.6.3 +VERSION ?= v0.6.4 REGISTRY ?= tmaxcloudck # Image URL to use all building/pushing image targets diff --git a/config/release.yaml b/config/release.yaml index d5f4446..255931b 100644 --- a/config/release.yaml +++ b/config/release.yaml @@ -84,7 +84,7 @@ spec: containers: - command: - /controller - image: docker.io/tmaxcloudck/cicd-operator:v0.6.3 + image: docker.io/tmaxcloudck/cicd-operator:v0.6.4 imagePullPolicy: Always name: manager env: @@ -171,7 +171,7 @@ spec: containers: - command: - /blocker - image: docker.io/tmaxcloudck/cicd-blocker:v0.6.3 + image: docker.io/tmaxcloudck/cicd-blocker:v0.6.4 imagePullPolicy: Always name: manager resources: @@ -231,7 +231,7 @@ spec: containers: - command: - /webhook - image: docker.io/tmaxcloudck/cicd-webhook:v0.6.3 + image: docker.io/tmaxcloudck/cicd-webhook:v0.6.4 imagePullPolicy: Always name: manager resources: @@ -291,7 +291,7 @@ spec: containers: - command: - /apiserver - image: docker.io/tmaxcloudck/cicd-api-server:v0.6.3 + image: docker.io/tmaxcloudck/cicd-api-server:v0.6.4 imagePullPolicy: Always name: manager resources: diff --git a/pkg/dispatcher/dispatcher.go b/pkg/dispatcher/dispatcher.go index 2df024a..29752fd 100644 --- a/pkg/dispatcher/dispatcher.go +++ b/pkg/dispatcher/dispatcher.go @@ -19,6 +19,7 @@ package dispatcher import ( "context" "fmt" + "regexp" "strings" cicdv1 "github.com/tmax-cloud/cicd-operator/api/v1" @@ -362,5 +363,13 @@ func applyNotification(jobs []cicdv1.Job, noti *cicdv1.Notification) []cicdv1.Jo } func matchString(incoming, target string) bool { - return incoming == target + if strings.ContainsAny(target, "*^?") { + re, err := regexp.Compile(target) + if err != nil { + return false + } + return re.MatchString(incoming) + } else { + return incoming == target + } }