Access workspace of other project

1,295 views
Skip to first unread message

jer...@bodycad.com

unread,
Jul 11, 2016, 10:16:55 AM7/11/16
to Jenkins Users
Hi,
I have a project that run some code analysis after the build. I make them into another project that is trigger after the other one. I'm looking to set the Working diirectory with environment variables.

Current setup have a custom (under Windows):
Workspace Root Directory d:/JenkinsWorkspace/${ITEM_FULL_NAME}

My main project use the default workspace (let's call it AA).
My second project (do the post build analysis under it's own project) should use the AA project workspace.

Is there any environment variable to use the default access Workspace Root Directory without the ${ITEM_FULL_NAME} ?
Or even better have a way to use the same workspace as another project?

Currently I use the full path but this is painfull when moving to other machine, you don't only have to change the Jenkins config but also the project and this is bad.

x Use custom workspace
Directory = d:/JenkinsWorkspace/AA

I would rather have something like:
Directory =  ${DEFAULT_WORKSPACE}/../AA
or even better:
Directory = ${ALL_WORKSPACE}["AA"]

Thanks,
Jerome

Björn Pedersen

unread,
Jul 11, 2016, 10:38:54 AM7/11/16
to Jenkins Users
Hi,

as the workspace is a volatile object in the general case,  you should consider https://wiki.jenkins-ci.org/display/JENKINS/Clone+Workspace+SCM+Plugin.

Björn

Jérôme Godbout

unread,
Jul 11, 2016, 11:26:35 AM7/11/16
to jenkins...@googlegroups.com
Hi Björn Pedersen,

Wouldn't that be a huge waste of disk I/O just to run a small script and output some data. I would rather not copy over 6Go of project data (without the SCM, with SCM this copy will be a huge waste and burn hard drive for nothing).

I do it into another project only to have separated build result for each part:
  • compiling 
  • Qml script inspection
  • Doxygen generation
  • UnitTest
  • Smoke test
  • Benchmark tests
They are cumulative for the same workspace but they have their own results (I would like avoid 6 copy for nothing). I allow only starting the Compiling one, the rest of them are launch after. The Compiling is lock down until the rest complete to avoid that volatile problem. I currently only have a single build machine (so master/slave is not an issue yet but will one day I guess.

Maybe I do it wrong, but that give us a good idea of what is wrong and failing the Qml inspection is not as vital as a compilation failure, so a warning into Qml inspection or Doxygen generation is not as bad as warning into compiling.

Jerome


--
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/QoQE2ULapro/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/392bf44a-0ad7-4459-9f39-d64c5cc7add2%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Björn Pedersen

unread,
Jul 11, 2016, 11:51:44 AM7/11/16
to Jenkins Users
For your use case using a pipeline(workflow) job with it's stages feature seems an option.

jer...@bodycad.com

unread,
Jul 11, 2016, 1:24:38 PM7/11/16
to Jenkins Users
Hi again,
I'm trying that pipeline plugin (did not touched it yet) just to give myself an idea of what it look like. I'm facing a weird display problem I guess, because the example and walkthrough are talking about Script textArea, but I don't see any into my config web page??? See what I see below. I checked the page code, the textArea is inside the div workflow-editor-wrapper with style display: none; Is that a known bug with Jenkins 2.8? Even after save the project pipeline and configure it again make this behavior, so I need to go edit the html CSS property manually to see the script zone.



Baptiste Mathus

unread,
Jul 17, 2016, 3:00:37 PM7/17/16
to jenkins...@googlegroups.com

Not aware of that bug, but you want to scan the issue tracker for this maybe.
What's your browser BTW? Would it by chance happen to be an old IE or something?


--
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/94fa6e28-0c7d-4cf6-9884-0a0f2c80b152%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages