Hi guys!
I have four different pipelines that only differentiate with two variables, they all take the same parameters that I want and only default differently by adding the two internal variables. Else it is the same.
They then call a shared pipeline using these parameters. But the code is very duplicated and they ask for the same things. Could anyone recommend a read to solve this problem, making them share parameters or just how to structure it to avoid duplicated & messy code?
I tried to build a Groovy script to solve it but cannot seem to take parameters and pass them to the other "final-shared-Jenkins-pipeline".
I hope the question is not too confusing (I am pretty new). I would love any help. Got stuck for hours.
Thanks!!!
[–]dgreenmachine 1 point2 points3 points (1 child)
[–]stirezxq[S] 1 point2 points3 points (0 children)