Getting all workspace paths

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting all workspace paths

Artur Szostak
Hello,

How is one supposed to get the workspaces produced by multiple runs of a job if it is allowed to execute builds concurrently? For example, a job called myjob will have workspaces myjob, myjob@2, myjob@3 etc for 3 concurrent builds. There are plenty of examples that indicate to use getWorkspaceFor from hudson.model.Node. But the API only returns one workspace, not all workspaces for all concurrent builds. Is the API broken?

Kind regards.

Artur

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/40c8ebdbb04a4cb1b1374e55eb793ba3%40partner.eso.org.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Getting all workspace paths

Jesse Glick-4
You would have to append the suffix yourself. Probably you should not be attempting this to begin with. Consider cloud agents with transient workspaces, etc. What are you ultimately trying to accomplish?

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3SvPwq%2BkrSFGoV%3DNJj9CgGGfuV-NAcYeAEdEg1Gd_dWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Getting all workspace paths

Artur Szostak
I am trying to clean up multiple workspaces created by a job that is allowed to run concurrently on a dumb node.
I see no consistent facility to cleanup all the workspaces in the GUI. Thus, I need to script it. But now I see that the API is inconsistent also.
OK, I will have to try guess the paths then, and hope I am right.

Is there any way for the secondary workspaces not to get a @<number> suffix? i.e. what other suffices do I have to look out for?

Cheers

Artur
________________________________________
From: [hidden email] <[hidden email]> on behalf of Jesse Glick <[hidden email]>
Sent: 06 September 2017 00:10:34
To: Jenkins Dev
Subject: Re: Getting all workspace paths

You would have to append the suffix yourself. Probably you should not be attempting this to begin with. Consider cloud agents with transient workspaces, etc. What are you ultimately trying to accomplish?

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]<mailto:[hidden email]>.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3SvPwq%2BkrSFGoV%3DNJj9CgGGfuV-NAcYeAEdEg1Gd_dWA%40mail.gmail.com<https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3SvPwq%2BkrSFGoV%3DNJj9CgGGfuV-NAcYeAEdEg1Gd_dWA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f0a61ae7db9842c3aad8e610d61c7c72%40partner.eso.org.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Getting all workspace paths

Jesse Glick-4
On Wed, Sep 6, 2017 at 11:03 AM, Artur Szostak <[hidden email]> wrote:
> I am trying to clean up multiple workspaces created by a job that is allowed to run concurrently on a dumb node.
> I see no consistent facility to cleanup all the workspaces in the GUI.

JENKINS-2111 and have fun following the chains of linked issues.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2%2BaYLLoUJT96jm1i7zY%2BHPHjAPpruSXt%2BOmuqt6v42TQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.