From 561c69d9f11bc02fa1e3d0f5b25c32cf1d2f2e12 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Tue, 23 Feb 2016 20:30:24 -0500 Subject: [PATCH] Review 2 --- pkg/cmd/cli/cmd/set/triggers.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/cli/cmd/set/triggers.go b/pkg/cmd/cli/cmd/set/triggers.go index 487425c3472b..96c109cb9529 100644 --- a/pkg/cmd/cli/cmd/set/triggers.go +++ b/pkg/cmd/cli/cmd/set/triggers.go @@ -623,7 +623,11 @@ func triggerMatchesBuildImageChange(trigger ImageChangeTrigger, strategyTrigger if imageChange.From == nil { return strategyTrigger != nil && strategyTrigger.From == trigger.From && strategyTrigger.Namespace == trigger.Namespace } - return strategyTrigger.From == trigger.From && strategyTrigger.Namespace == trigger.Namespace + namespace := imageChange.From.Namespace + if strategyTrigger != nil { + namespace = defaultNamespace(namespace, strategyTrigger.Namespace) + } + return imageChange.From.Name == trigger.From && namespace == trigger.Namespace } func filterBuildImageTriggers(src []buildapi.BuildTriggerPolicy, trigger ImageChangeTrigger, strategyTrigger *ImageChangeTrigger) []buildapi.BuildTriggerPolicy {