Re: Approaches for sharing workspace in a pipeline

2015-12-30 Thread Martin d'Anjou
Producer code: String root = "/opt/martin" String workspace = "${root}/${env.JOB_NAME}/${env.BUILD_NUMBER}" node() { ws(workspace) { writeFile file: 'file.txt', text: "1234" } } Consumer code: String root = "/opt/martin" String folder = env.JOB_NAME.split('/')[0..-2].join('/')

Re: Approaches for sharing workspace in a pipeline

2015-12-30 Thread Thomas Goeppel
Hi John, your approach sounds interesting. Could you please share some Workflow code that shows how you compute the Workspace location, use ws(), and pass workspace locations to subsequent jobs? When accessing workspaces in Workflow you're also facing the problem of concurrent runs. How do

Re: Approaches for sharing workspace in a pipeline

2015-12-30 Thread Thomas Goeppel
Oh sorry, wrong addressee %s/John/Martin/ :-) On Wednesday, December 30, 2015 at 11:24:26 AM UTC+1, Thomas Goeppel wrote: > > Hi John, > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving

Re: Approaches for sharing workspace in a pipeline

2015-12-29 Thread Martin d'Anjou
On Wednesday, December 23, 2015 at 9:45:57 PM UTC-5, John D. Ament wrote: > > Hi, > > I was wondering if anyone had any best practices or tips to share on have > a common workspace for a pipeline job. > I use Workflow job definitions, and I compute the location of the workspace in each job of

Re: Approaches for sharing workspace in a pipeline

2015-12-28 Thread Brian Ray
Ah yes, that help seems a little misleading with the wording "May take a *mapping* parameter ..." On Sunday, December 27, 2015 at 8:02:36 PM UTC-8, John D. Ament wrote: > > Ok, so I think I got something. If I use "**/*" on the unarchive step, I > get everything. Not quite what I expected,

Re: Approaches for sharing workspace in a pipeline

2015-12-27 Thread John D. Ament
Ok, so I think I got something. If I use "**/*" on the unarchive step, I get everything. Not quite what I expected, but it works. On Thursday, December 24, 2015 at 1:20:16 PM UTC-5, John D. Ament wrote: > > Creating the archive doesn't seem to be an issue. > > Its the unarchive step where

Re: Approaches for sharing workspace in a pipeline

2015-12-24 Thread Brian Ray
Isn't the "get everything" Ant regex something like or ***/**? If you continue looking at workflow, also check out the *stash* and *unstash *steps. Similar purpose and syntax but more applicable to intermediate stages where you don't need to retain the artifacts. You can also refer to the

Re: Approaches for sharing workspace in a pipeline

2015-12-24 Thread John D. Ament
Creating the archive doesn't seem to be an issue. Its the unarchive step where things don't quite work for me. If I read this info, it implies that the mapping step is not required.

Re: Approaches for sharing workspace in a pipeline

2015-12-24 Thread John D. Ament
Hi, I definitely thought about workflow. It looks promising. One question though - I can't seem to archive/unarchive everything. It looks like to use unarchiver you need to know the paths that will be exposed, and instead I'd like to just get everything, including class files. Is that

Approaches for sharing workspace in a pipeline

2015-12-23 Thread John D. Ament
Hi, I was wondering if anyone had any best practices or tips to share on have a common workspace for a pipeline job. Basically, I have a series of pipeline jobs and I want them to have a single workspace for the duration of the job chain. I compile the artifacts once, running unit tests,

Re: Approaches for sharing workspace in a pipeline

2015-12-23 Thread Baptiste Mathus
Hi John, Not sure what you call a pipeline job, do you mean 'workflow job'? or do you use the term in a generic way and actually have many (freestyle) jobs you're coordinating? If the latter, then it really seems like a use case for a workflow job (using the workflow plugin). Using/archiving