Skip to content

Commit

Permalink
[fix] modify func matchString in dispatcher (#398)
Browse files Browse the repository at this point in the history
* [fix] modify func matchString in dispatcher

* [fix] modify func matchString in dispatcher
  • Loading branch information
clee94713 authored Dec 6, 2022
1 parent 6d83805 commit a789582
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Current Operator version
VERSION ?= v0.6.0
VERSION ?= v0.6.1
REGISTRY ?= tmaxcloudck

# Image URL to use all building/pushing image targets
Expand Down
8 changes: 4 additions & 4 deletions config/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ spec:
containers:
- command:
- /controller
image: docker.io/tmaxcloudck/cicd-operator:v0.6.0
image: docker.io/tmaxcloudck/cicd-operator:v0.6.1
imagePullPolicy: Always
name: manager
env:
Expand Down Expand Up @@ -171,7 +171,7 @@ spec:
containers:
- command:
- /blocker
image: docker.io/tmaxcloudck/cicd-blocker:v0.6.0
image: docker.io/tmaxcloudck/cicd-blocker:v0.6.1
imagePullPolicy: Always
name: manager
resources:
Expand Down Expand Up @@ -231,7 +231,7 @@ spec:
containers:
- command:
- /webhook
image: docker.io/tmaxcloudck/cicd-webhook:v0.6.0
image: docker.io/tmaxcloudck/cicd-webhook:v0.6.1
imagePullPolicy: Always
name: manager
resources:
Expand Down Expand Up @@ -291,7 +291,7 @@ spec:
containers:
- command:
- /apiserver
image: docker.io/tmaxcloudck/cicd-api-server:v0.6.0
image: docker.io/tmaxcloudck/cicd-api-server:v0.6.1
imagePullPolicy: Always
name: manager
resources:
Expand Down
7 changes: 1 addition & 6 deletions pkg/dispatcher/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package dispatcher
import (
"context"
"fmt"
"regexp"
"strings"

cicdv1 "github.com/tmax-cloud/cicd-operator/api/v1"
Expand Down Expand Up @@ -363,9 +362,5 @@ func applyNotification(jobs []cicdv1.Job, noti *cicdv1.Notification) []cicdv1.Jo
}

func matchString(incoming, target string) bool {
re, err := regexp.Compile(target)
if err != nil {
return false
}
return re.MatchString(incoming)
return incoming == target
}

0 comments on commit a789582

Please sign in to comment.