Workflow Plugin -- temporary files are created in the workspace directory

751 views
Skip to first unread message

Rinaldo DiGiorgio

unread,
Mar 31, 2015, 3:29:24 PM3/31/15
to jenkins...@googlegroups.com
Hi,

   I am evaluating the workflow plugin as a replacement for our current approach and have a few questions.  I thought I would ask them individually and see how that goes before asking too many questions on the list.  The first question is about using multiple scms. I am using git and hg and I have a for loop that retrieves all the source.  I need to package that source up and put it into artifactory or nexus.  I am able to perform the clones and pulls.  Once the for loop is completed I attempt to run tar and I get an error message about the file save changed.  An outline of the workflow script follows:

  node('some node') {

     for ( iterate over all the repos )


  }


  sh tar cvf /tmp/somefile name

  tar sees some files that are not in the repo.  Is jenkins actually creating files in the workspace directory instead of some tmp directory.

  Is this the expected behavior?

  I can't simply ignore all .hidden files since the workspace may use them in some way.  Is my only option to use a regex that assumes that there is a temporary hidden directory from Jenkins that is 8 digits of lowercase characters and digits.

Rinaldo





Rinaldo DiGiorgio

unread,
Apr 3, 2015, 11:04:33 AM4/3/15
to jenkins...@googlegroups.com
I want to create a tar file and put that file in artifactory. When I try to execute the tar command -- tar fails for the following reason.


./get_source.sh
./.5f048961/
./.5f048961/script.sh
./.5f048961/jenkins-log.txt
tar: ./.5f048961/jenkins-log.txt: file changed as we read it 
./.5f048961/pid

Why is jenkins creating a log directory in the workspace? 

Rinaldo DiGiorgio

unread,
Apr 6, 2015, 2:36:02 PM4/6/15
to jenkins...@googlegroups.com


Depending on what is put in the files, this could be considered a security bug. An unknowing user of Jenkins workflow could be revealing information in say a source bundle that includes the temporary directory.

Jesse Glick

unread,
Jun 16, 2015, 3:06:38 PM6/16/15
to jenkins...@googlegroups.com
On Tuesday, March 31, 2015 at 3:29:24 PM UTC-4, Rinaldo DiGiorgio wrote:
Is jenkins actually creating files in the workspace directory instead of some tmp directory.

Pending JENKINS-27152, yes.
 
I can't simply ignore all .hidden files since the workspace may use them in some way.  Is my only option to use a regex that assumes that there is a temporary hidden directory from Jenkins that is 8 digits of lowercase characters and digits.

Currently yes. 

Rinaldo DiGiorgio

unread,
Sep 29, 2015, 6:37:19 PM9/29/15
to Jenkins Users
This appears to be fixed -- thanks.


On Tuesday, March 31, 2015 at 3:29:24 PM UTC-4, Rinaldo DiGiorgio wrote:
Reply all
Reply to author
Forward
0 new messages