I have x2 declarative pipeline Jobs, both with many many params. How can I take the params provided to the parent, and add to them, to pass to the child job?
I currently define them all individually, but this is prone to mistakes as there's a lot of them.
I also have figured out it's possible to obtain a list of params and pass them to the child job:
script{
def myparams = currentBuild.rawBuild.getAction(ParametersAction).getParameters()
build( job: 'childJobName', parameters: myparams)
}
What I haven't figured out is how to add to this list as it's unmodifiable. I'd need to make a copy and add to that, but I've not had any success doing this.