pipeline - Avoiding repeating work if nodes execute on same build executor?

35 views
Skip to first unread message

Jonathan Hodgson

unread,
Jul 5, 2016, 7:28:02 AM7/5/16
to Jenkins Users
Hi,

My project workflow is

1) Checkout revision from repository
2) Apply patch
3) Build various versions (debug/release, 32/64 bit etc).

Now right now I only have one executor, so the various builds will have to happen sequentially, but I would prefer to write the script such that if I add extra executors at a later date, it will use them

So it seems to make sense to divide the building between nodes, in a parallel block.

However, I don't want to be repeating steps 1 and 2 if they've already been done on that executor.

Is there a standard way to do this?

regards

Jon

Antonio Muñiz

unread,
Jul 20, 2016, 11:52:18 AM7/20/16
to jenkins...@googlegroups.com
Put 1 and 2 inside a `node`, then `stash` anything you will need later
and `unstash` it on any subsequent `node`.
> --
> 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-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/aa0a352e-3eba-4e30-a62e-c5795d8e88ed%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Antonio Muñiz
Software Engineer
CloudBees, Inc.

Martin d'Anjou

unread,
Jul 20, 2016, 2:34:38 PM7/20/16
to Jenkins Users
You could also try the external workspace manager plugin (alpha has been released):
https://jenkins.io/blog/2016/06/30/ewm-alpha-version/

Martin

Reply all
Reply to author
Forward
0 new messages