We have around 7 pipelines for each operator, they all have same/similar functions inside, but currently we copy paste them which is very error prone and makes pipelines sometimes diverge. The task is to create include/shared file for common functions and maybe even better create a pipeline template which can use parameters to run tests for different projects
We have around 7 pipelines for each operator, they all have same/similar functions inside, but currently we copy paste them which is very error prone and makes pipelines sometimes diverge.
The task is to create include/shared file for common functions and maybe even better create a pipeline template which can use parameters to run tests for different projects
Here's some ideas:
shared pipeline template: https://www.jenkins.io/blog/2017/10/02/pipeline-templates-with-shared-libraries/
include file (but this might be tricky in jenkins so need to investigate): https://stackoverflow.com/questions/9136328/including-a-groovy-script-in-another-groovy/9154553#9154553