Short explanation:
- There are many repos in our Git
- Each repo has it's own Jenkinsfile who has it's own separate Job at Jenkins
- All Jenkins files are doing 99% the same thing!
What we want to achieve at the moment:
- Build one Jenkinsfile for all repo
- Maintain branches in between repos
- Delete if we can the current Jenkins files of each repo and use the only generic new file.
- Have the versatile to use and manipulate parameters so Jenkins file won't be affected by any other repo config
Solutions for now:
- Remove all Jenkins files in all repos
- Re-configure the Jenkinsfile PATH in Jenkins gui website to direct to our new file
- Put a config .yaml file in each repo who will contains all the relevant information of each repo (like key-value)
- So, when each repo will be triggered, our new Jenkinsfile will load the config file and use the parameters to proceed all the stages related to the config file.
I would be happy to hear ideas / examples / snippets from you guys! It will highly help me!
Regards
Niv