Create shared Jenkinsfiles for backend and frontend services


As pointed out in this review when we are doing changes to Jenkinsfiles we are coping them from one service to another. This is not DRY approach. We may consider having shared Jenkinsfiles for UI and backend services.


  • we probably could lose possibility to have dedicated stages for separate services. We should probably think of a way to allow each service to declare own stages

  • this change will make our services less independent

  • Jenkins pipeline with multibranch scans repository using Jenkinsfile from master branch so this might cause some problems. There is a plugin that might help with this problem.

We need to verify if those concerns will not be problematic. This ticket should be treated as spike where we need to:

  • move Jenkinsfile to separate repository and try using it in some pipeline job,

  • parametrize this Jenkins file that it can be used for other pipeline jobs

  • make possible to define multiple contract test steps for each service

If one of those steps won't be doable we can close this ticket and abandon this idea, otherwise we should create ticket(s) for introducing this shared Jenkins file to other pipeline jobs.




Mateusz Kwiatkowski