[JIRA] (JENKINS-22795) git plugin cleans workspace on initial clone

0 views
Skip to first unread message

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 15, 2019, 3:08:02 PM1/15/19
to jenkinsc...@googlegroups.com
Mark Waite updated an issue
 
Jenkins / Bug JENKINS-22795
git plugin cleans workspace on initial clone
Change By: Mark Waite
Summary: git plugin always cleans workspace , even when instructed not to on initial clone
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 15, 2019, 3:20:02 PM1/15/19
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-22795
 
Re: git plugin cleans workspace on initial clone

Roy Dahan you may want to check the agent where that job is running. The removal of the contents only happens on the initial creation of the workspace, not on later requests to update an existing workspace. Something on the agent running the build may be causing the plugin to believe that it needs to perform a fresh clone rather than performing an incremental update.

If you're using a Pipeline, you may also want to check the Pipeline definition that it does not include a separate call to deleteDir().

roy@scylladb.com (JIRA)

unread,
Jan 15, 2019, 4:24:03 PM1/15/19
to jenkinsc...@googlegroups.com

I don't know if it's related, but few lines in the log before the delete it seems like the agent is started.

It happens every run.

(It's not a pipeline job)
[ssh-agent] Looking for ssh-agent implementation...20:02:23 [ssh-agent] Exec ssh-agent (binary ssh-agent on a remote machine)20:02:23 $ ssh-agent*20:02:24* SSH_AUTH_SOCK=/tmp/ssh-3IVCGhG3LDLW/agent.20456*20:02:24* SSH_AGENT_PID=20458*20:02:24* [ssh-agent] Started.

roy@scylladb.com (JIRA)

unread,
Jan 15, 2019, 4:24:04 PM1/15/19
to jenkinsc...@googlegroups.com
Roy Dahan edited a comment on Bug JENKINS-22795
I don't know if it's related, but few lines in the log before the delete it seems like the agent is started.

It happens every run.

(It's not a pipeline job)
{code:java}
[ssh-agent] Looking for ssh-agent implementation... * 20:02:23 * [ssh-agent]   Exec ssh-agent (binary ssh-agent on a remote machine) * 20:02:23 * $ ssh-agent*20:02:24* SSH_AUTH_SOCK=/tmp/ssh-3IVCGhG3LDLW/agent.20456*20:02:24* SSH_AGENT_PID=20458*20:02:24* [ssh-agent] Started. {code}

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 15, 2019, 5:00:02 PM1/15/19
to jenkinsc...@googlegroups.com

The log entry you provided which mentions ssh-agent is from the ssh-agent plugin, not from the Jenkins agent. It is unlikely to be related to the deletion of files which exist in the workspace of a job before the first clone into the workspace.

This bug report is describing a very specific condition which only exists when the workspace of a job is not empty the very first time that Jenkins uses the workspace. That is quite rare. Freestyle jobs usually create the workspace on the Jenkins agent the first time the job is run, then they reuse that workspace on later execution of the same job. When the workspace is created, it is empty and the deletion that is described in this bug report is harmless.

There are Jenkins plugins which will allow Freestyle jobs to write files into the workspace after the job starts and before the git repository is cloned into the workspace. The deletion behavior described here will delete those files that are created in the workspace before the git repository is first cloned.

I was trying to suggest earlier that you should confirm that the workspace where the files are being deleted has not been damaged or partially deleted by some other scripts or changes in your environment.

mark.earl.waite@gmail.com (JIRA)

unread,
Nov 8, 2019, 11:16:03 AM11/8/19
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-22795
[~roydahan] you may want to check the agent where that job is running.  The removal of the contents only happens on the * initial * creation of the workspace, not on later requests to * update an existing workspace * .  Something on the agent running the build may be causing the plugin to believe that it needs to perform a fresh clone rather than performing an incremental update.


If you're using a Pipeline, you may also want to check the Pipeline definition that it does not include a separate call to deleteDir().
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Nov 8, 2019, 11:16:04 AM11/8/19
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-22795
[~roydahan] you may want to check the agent where that job is running.  The removal of the contents only happens on the *initial* creation of the workspace, * not * on later requests to *update an existing workspace*.  Something on the agent running the build may be causing the plugin to believe that it needs to perform a fresh clone rather than performing an incremental update.


If you're using a Pipeline, you may also want to check the Pipeline definition that it does not include a separate call to deleteDir().

mark.earl.waite@gmail.com (JIRA)

unread,
Apr 4, 2020, 8:47:03 PM4/4/20
to jenkinsc...@googlegroups.com
Mark Waite assigned an issue to Unassigned
 
Change By: Mark Waite
Assignee: Cristian Cureliuc
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages