[JIRA] [workflow-plugin] (JENKINS-33126) unstash fails to overwrite read-only files

7 views
Skip to first unread message

jenkinsjira@marcuscobden.co.uk (JIRA)

unread,
Feb 24, 2016, 7:05:02 AM2/24/16
to jenkinsc...@googlegroups.com
Marcus Cobden created an issue
 
Jenkins / Bug JENKINS-33126
unstash fails to overwrite read-only files
Issue Type: Bug Bug
Assignee: Jesse Glick
Attachments: stacktrace.txt
Components: workflow-plugin
Created: 24/Feb/16 12:04 PM
Priority: Minor Minor
Reporter: Marcus Cobden

We're using stash & unstash to pass a checked out git repository between steps in our workflow.
On first run the unstash works successfully, however on a second run the unstash fails because some of the files in the `.git` directory are read-only.

I've attached the stack trace, it's a bit misleading, we've fixed it by running a `sh 'chmod -R u+w .git'` before the unstash step.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

jglick@cloudbees.com (JIRA)

unread,
Aug 29, 2016, 4:39:01 PM8/29/16
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Component/s: workflow-api-plugin
Component/s: pipeline
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

omit.rathore@gmail.com (JIRA)

unread,
Mar 1, 2018, 4:58:02 PM3/1/18
to jenkinsc...@googlegroups.com
Omit Rathore commented on Bug JENKINS-33126
 
Re: unstash fails to overwrite read-only files

Yes same issue I have also faced , recommend it to increase priority as some integration tools needs git meta

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

mariusz.adamczyk@pega.com (JIRA)

unread,
Nov 22, 2018, 2:41:02 PM11/22/18
to jenkinsc...@googlegroups.com

I face the same issue. Unfortunately workaround using chmod i snot working for me.
Please increase the issue priority as it  significantly affects pipelines performance - instead of reusing existing artifacts every stage requires rebuilding them.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

Christian.Kipping@cgm.com (JIRA)

unread,
May 9, 2019, 2:45:02 AM5/9/19
to jenkinsc...@googlegroups.com

What is the status of the ticket? We have the same problem.

alan@czajkowski.ca (JIRA)

unread,
Apr 28, 2020, 4:06:02 PM4/28/20
to jenkinsc...@googlegroups.com

running into the same problem, being able to unstash the .git/ directory is very important for certain tools and needs to be allowed when moving the workspace around

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

alan@czajkowski.ca (JIRA)

unread,
Apr 28, 2020, 4:11:03 PM4/28/20
to jenkinsc...@googlegroups.com
Alan Czajkowski edited a comment on Bug JENKINS-33126
running into the same problem, being able to unstash the {{.git/}} directory is very important for certain tools and needs to be allowed when moving the workspace around


{{Jenkinsfile}}:
{code}
...
  stash name: WORKSPACE_NAME, useDefaultExcludes: false
...
  unstash name: WORKSPACE_NAME
...
{code}

alan@czajkowski.ca (JIRA)

unread,
Apr 28, 2020, 4:16:04 PM4/28/20
to jenkinsc...@googlegroups.com
Alan Czajkowski edited a comment on Bug JENKINS-33126
running into the same problem, being able to unstash the {{.git/}} directory is very important for certain tools and needs to be allowed when moving the workspace around

{{Jenkinsfile}}:
{code}
...
  stash name: WORKSPACE_NAME, useDefaultExcludes: false
...
  unstash name: WORKSPACE_NAME
...
{code}


references:
- https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/#stash-stash-some-files-to-be-used-later-in-the-build
{quote}*useDefaultExcludes* (optional)
If selected, use the default excludes from Ant - see [here|http://ant.apache.org/manual/dirtasks.html#defaultexcludes] for the list.
Type: boolean
{quote}
Reply all
Reply to author
Forward
0 new messages