Thank you Brian, you're right regarding the @tmp directory.  However 
the @script directory seems to be different.
     I'm searching in the source code of the workflow cps plugin.  The file 
CpsScmFlowDefinition.java seems to be the place where the workspace@script 
behavior is implemented.  It seems that it use this mechanism to checkout 
and search the entire repository for the Jenkinsfile.  I didn't look very 
careful at this code yet but it make me concern a little bit about the 
efficiency of this operation.  If in order to search for the Jenkinsfile, 
it has to check out the entire repository then it would be quite slow for 
big repository.  I wonder whether some repository has option to simply 
search the file inside or not and whether Jenkins actually implements this 
functionality this way.

Tom

On Friday, April 1, 2016 at 11:07:41 AM UTC-5, Brian Ray wrote:
>
> https://issues.jenkins-ci.org/browse/JENKINS-27152
>
> I'm not sure about @script but suspect it's a similar necessity.
>
> On Friday, April 1, 2016 at 12:00:18 AM UTC-7, tomwils...@gmail.com wrote:
>>
>> Hello,
>>    I'm trying to setup Jenkins to run a multibranch pipeline project. 
>>  Just to test, I use a very simple Jenkinsfile like this:
>>
>> node {
>> checkout scm
>> bat 'echo > tst1.txt'
>> }
>>
>> When I run the build, for each branch, for example the 'master' branch, 
>> Jenkins creates 3 directories:
>> - workspace@script: contains source code.  This is created first even 
>> before the node statement is executed.
>> - workspace: contains source code.  This is created with the node 
>> statement
>> - workspace@tmp: empty.  This is created when running 'bat' command.
>>
>>
>> - Certainly I do not need 2 copies of the source code so I don't need the 
>> workspace@script directories but this is created automatically and I do not 
>> know how to turn it off.  The default directory when inside the node 
>> command block is 'workspace', not 'workspace@script' so I can't do anything 
>> with the source unless I change directory to workspace@script.  Is there 
>> anyway so that Jenkins does not check out the workspace@script directory?
>>
>> - What is the purpose of workspace@tmp? and is there a way not to create 
>> it as well?
>>
>> Thanks
>>
>>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d39129cc-7ffd-40f4-a393-a8a46404e0ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to