Why does my pipeline have 2 workspaces?

432 views
Skip to first unread message

John Lussmyer

unread,
Aug 21, 2019, 11:43:35 AM8/21/19
to jenkins...@googlegroups.com
I've noticed that my single pipeline ends up with 2 separate workspaces each time it runs.
What is the one ending in @script for?

--
--
CasaDelGato Sensible Email package: https://sourceforge.net/projects/sensibleemail/

Giles

unread,
Aug 21, 2019, 12:04:21 PM8/21/19
to Jenkins Users
On Wednesday, 21 August 2019 11:43:35 UTC-4, John Lussmyer wrote:
I've noticed that my single pipeline ends up with 2 separate workspaces each time it runs.
What is the one ending in @script for?

--

CasaDelGato Sensible Email package: https://sourceforge.net/projects/sensibleemail/

I'll second the question.

Our jobs end up with anywhere from 1-5 folders each, coming in a mix of variants:

jobname@libs
jobname@script
jobname@tmp
jobname@script@tmp
jobname@2
jobname@2@tmp

It's a lot of clutter I'd rather not see, but I assume they serve some purpose.  It would be nice to hear what that purpose is ...

Ramanathan Muthaiah

unread,
Aug 22, 2019, 11:01:34 PM8/22/19
to Jenkins Users
I've noticed that my single pipeline ends up with 2 separate workspaces each time it runs.
What is the one ending in @script for?

With no intent of grandstanding, this response will direct you to one of my article in dzone.com.


/Ram

Toby Hersey

unread,
Aug 27, 2019, 3:12:44 PM8/27/19
to jenkins...@googlegroups.com
i'll third the question , i want to know cause.

--
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/a03cfc18-5433-4b32-9251-e0c95a5c83eb%40googlegroups.com.

Ramanathan Muthaiah

unread,
Aug 27, 2019, 10:59:16 PM8/27/19
to Jenkins Users
On Wednesday, August 28, 2019 at 12:42:44 AM UTC+5:30, Toby Hersey wrote:
i'll third the question , i want to know cause.

In short:

The second (temporary) workspace is the area that's used by the pipeline to handle all of the code within the 'sh' step.

Based on what I analyzed, the pipeline creates a .sh file in that temporary workspace, the script's contents are what's there inside the 'sh' step. 
Apart from the shell script, in that temp workspace, there are few more files (in the tmp folder) for the purpose of pipeline durability.

HTH.

/Ram
 

Toby Hersey

unread,
Aug 28, 2019, 6:48:13 AM8/28/19
to jenkins...@googlegroups.com
Thanks Ram , is that the same for the @2 folders as well?

Or is that because a build has run 2 in parallel?

Many thanks
Toby 

--
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.

Ramanathan Muthaiah

unread,
Sep 2, 2019, 12:00:42 AM9/2/19
to Jenkins Users
On Wednesday, August 28, 2019 at 4:18:13 PM UTC+5:30, Toby Hersey wrote:
Thanks Ram , is that the same for the @2 folders as well?

Or is that because a build has run 2 in parallel?

Could be a possibility.

/Ram 

Vincent Latombe

unread,
Sep 6, 2019, 5:43:11 AM9/6/19
to Jenkins Users
@N (where N is an integer) is for concurrent builds, or concurrent node blocks using the same node within the same pipeline build, if you have nodes with multiple executors.
@script is for pipeline remote execution engine (as noted above, this is where temporary shell scripts are created before being executed)
@tmp is for temporary files (you can refer to it in your pipeline using pwd tmp: true)
@libs is used for shared libraries

Vincent


--
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.

Toby Hersey

unread,
Sep 8, 2019, 3:56:26 AM9/8/19
to jenkins...@googlegroups.com
Thanks for the answer Vincent 😀

Reply all
Reply to author
Forward
0 new messages