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 
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, 'christop...@googlemail.com' 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

>.

 > To unsubscribe from this group and all its topics, send an email to
 > jenkinsci-use...@googlegroups.com
 > .
 > To view this discussion on the web visit
 >

https://groups.google.com/d/msgid/jenkinsci-users/5d806b70-3cab-463e-a27f-097daaa3679en%40googlegroups.com



 >

>.


-- 
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 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 .
To unsubscribe from this group and all its topics, send an email to 
jenkinsci-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/12a60d25-485a-4cf3-a237-a45a470ba959n%40googlegroups.com 
.


--
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

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 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, 'christop...@googlemail.com' 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 
>  >.
> > To unsubscribe from this group and all its topics, send an email to 
> > jenkinsci-use...@googlegroups.com 
> > .
> > 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_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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/12a60d25-485a-4cf3-a237-a45a470ba959n%40googlegroups.com.


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 block in my pipeline to 
retrieve those values and use them?



On 19.10.2020 9:45, 'christop...@googlemail.com' 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 .
To unsubscribe from this group and all its topics, send an email to 
jenkinsci-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5d806b70-3cab-463e-a27f-097daaa3679en%40googlegroups.com 
.


--
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/3276e41f-55ad-e86d-28d8-89f8f7e8f2d9%40gmail.com.


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 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 the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5d806b70-3cab-463e-a27f-097daaa3679en%40googlegroups.com.


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 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 the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/8ebffe59-9ac7-489a-9bf1-388d77ea7289n%40googlegroups.com
> 
> .
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9Lz-q4NRxChqOoy7L4JhkrXxS5q8kqoP-i5WJ0_v%3Dp5Nw%40mail.gmail.com.


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 
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 the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8ebffe59-9ac7-489a-9bf1-388d77ea7289n%40googlegroups.com.