incubator-devlake
incubator-devlake copied to clipboard
feat(jenkins): add branch filtering for Jenkins jobs
add branch filtering for Jenkins jobs #8579
After reading issue #8579, could the problem be that
scope_api.goandremote_api.goare returning incorrect scopes?
Thanks for the review I checked both remote_api.go and scope_api.go. You're right to question this.
From what I can see:
-
remote_api.golooks fine - MultiBranchProject is treated as a scope (it's inscopesWithJobs), so its branch jobs won't show up as selectable scopes in the UI - The issue in #8579 is different - when you select a MultiBranchProject, the collector grabs all branch jobs underneath it, converts them to
cicd_pipelines, and they all show up in Grafana My PR filters branches during collection so only matching ones get into Grafana. But you're right that we should check ifGetScopeListis also returning these auto-collected branch jobs alongside user-selected scopes. Should I add logic to distinguish user-selected scopes from auto-collected branch jobs? Or is filtering at collection time enough for this use case?
Thanks for the explanation. @OG256 could you provide some context/input on this?