Re: Matrix in Pipelines

2020-10-20 Thread Roland Asmann
Thanks for the replies. I went with hard-coding the 2 nodes, in the hopes that at some point the matrix will allow use of variables for the value. On 19.10.2020 12:27, 'christop...@googlemail.com' via Jenkins Users wrote: You mean something like a dynamic axis created by a piece of script? I

Re: Matrix in Pipelines

2020-10-19 Thread 'christop...@googlemail.com' via Jenkins Users
You mean something like a dynamic axis created by a piece of script? I had a similar issue in the past and did not find a way. There might be something with script blocks in a pipeline and dynamic stage-creation with a for-loop. When I remember right I found some examples with google when I

Re: Matrix in Pipelines

2020-10-19 Thread Roland Asmann
Hi, Thanks for that. I see I forgot to mention something in my original post: The nodes I want to run my job on should come from a label. So I would need to get the 'values' in the matrix-part by figuring out which nodes have this label set... Can I add a simple 1-, maybe 2-line script

Re: Matrix in Pipelines

2020-10-19 Thread 'christop...@googlemail.com' via Jenkins Users
Hi, I don't exactly understand your problem. Please have a look here: https://www.jenkins.io/blog/2019/11/22/welcome-to-the-matrix/ you very easily can integrate matrix in a declarative pipeline. Insert your nodes as an axis of the matrix and add an 'agent' in the stage doing your job. But

Re: Matrix in Pipelines

2020-10-18 Thread Jan Monterrubio
Could you do a job that takes a Node parameter and then a job with 2 stages, one for each node that just calls the first job? On Sun, Oct 18, 2020 at 11:24 Roland Asmann wrote: > Hey everybody, > > I have this job, written as a declarative pipeline, the now needs to be > run on 2 nodes instead

Matrix in Pipelines

2020-10-18 Thread Roland Asmann
Hey everybody, I have this job, written as a declarative pipeline, the now needs to be run on 2 nodes instead of just 1. Before, I would use the Matrix-Job for that, but I am not quite sure how to do this in my pipeline... I searched around a bit and found some example on how to do it with a