Skip to main content
1 of 2
seanr8
  • 111
  • 3

Jenkins Pipeline steps that run before Jenkinsfile

I'm just starting to get my toes wet with Jenkins and CI/CD and am trying to drag company culture along with it.

I've built a set of static analysis tools and corresponding configurations I want to run before a branch's Jenkinsfile is even considered. I want to take that out of the control of the git repo itself because I've been given the task of shifting company culture and improving code quality, but if left up to individual repos, there's a good chance the maintainer of the repo will just remove analysis steps that are failing their build. I want to take that power away from them until culture has shifted enough to begin to release that control.

Is there a way to have Jenkins run a set of steps that "parent" the Jenkinsfile such that if there parent steps fail, the Jenkinsfile is never run?

seanr8
  • 111
  • 3