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 investigated 
this.

Roland Asmann schrieb am Montag, 19. Oktober 2020 um 10:16:51 UTC+2:

> 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 block in my pipeline to 
> retrieve those values and use them?
>
>
> On 19.10.2020 9:45, '[email protected]' via Jenkins Users wrote:
> > 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 maybe I missed a point somewhere...
> > 
> > 
> > Roland Asmann schrieb am Sonntag, 18. Oktober 2020 um 18:23:48 UTC+2:
> > 
> > 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 scripted pipeline, but I would prefer to stick to the declarative
> > format -- if possible. The reason for that is that my team is just
> > learning about pipelines and have just about mastered declarative. I
> > don't want to throw them in the deep end for scripted yet.
> > 
> > Is this possible in declarative? If so, tips would be helpful.
> > If not, at least 1 reply telling me this would also be helpful! ;-)
> > 
> > Thanks,
> > Roland
> > 
> > -- 
> > You received this message because you are subscribed to a topic in the 
> > Google Groups "Jenkins Users" group.
> > To unsubscribe from this topic, visit 
> > 
> https://groups.google.com/d/topic/jenkinsci-users/DLoPOi8U5NI/unsubscribe 
> <https://groups.google.com/d/topic/jenkinsci-users/DLoPOi8U5NI/unsubscribe
> >.
> > To unsubscribe from this group and all its topics, send an email to 
> > [email protected] 
> > <mailto:[email protected]>.
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/jenkinsci-users/5d806b70-3cab-463e-a27f-097daaa3679en%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/jenkinsci-users/5d806b70-3cab-463e-a27f-097daaa3679en%40googlegroups.com?utm_medium=email&utm_source=footer
> >.
>
> -- 
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/12a60d25-485a-4cf3-a237-a45a470ba959n%40googlegroups.com.

Reply via email to