Skip to content

Commit

Permalink
Merge pull request #840 from ks-ci-bot/cherry-pick-837-to-release-3.3
Browse files Browse the repository at this point in the history
[release-3.3] Trigger pipeline metadata controller reconsile when update pipeline cr spec
  • Loading branch information
chilianyi authored Oct 21, 2022
2 parents fa720ae + fbc852e commit 230b1be
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions controllers/jenkins/pipeline/pipeline_metadata_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ var pipelineMetadataPredicate = predicate.Funcs{
return false
},
UpdateFunc: func(ue event.UpdateEvent) bool {
oldPipeline, okOld := ue.ObjectOld.(*v1alpha3.Pipeline)
newPipeline, okNew := ue.ObjectNew.(*v1alpha3.Pipeline)
if okOld && okNew {
if !reflect.DeepEqual(oldPipeline.Spec, newPipeline.Spec) {
return true
}
}
return false
},
GenericFunc: func(ge event.GenericEvent) bool {
Expand Down

0 comments on commit 230b1be

Please sign in to comment.