Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-46362

Stash/unstash within a Alpine container doesn't keep file attributes

      Stash and unstash of files within a container generate with kubernetes plugins doesn't keep the files attributes

      It is working fine elsewhere (slave not provided with kubernetes) but if we stash file generate within a pod or container, we get the bug

      This was working properly with version Kubernetes-plugin 0.10

      Here is a simple example of the problem, using the same pod/container.

      podTemplate(label: 'example') {
        node("example"){
          stage('checkout'){
            container("jnlp"){
              deleteDir()
              sh "touch A"
              sh "chmod a+x A"
              sh "ls -la"
      // File has the executable attribute
              stash name: 'artefact', includes: "A"
              deleteDir()
              unstash 'artefact'
              sh "ls -la" 
      // File have lost the executable attribute
            }
          }
        }
      }
      

       

      This example is pretty simple. But we use stash and unstash between pod and container quite a lot to avoid «checkout scm» + configure the code at each step.   

       

          [JENKINS-46362] Stash/unstash within a Alpine container doesn't keep file attributes

          Pascal Laporte created issue -
          Bruno Meneguello made changes -
          Link New: This issue is duplicated by JENKINS-36912 [ JENKINS-36912 ]
          Carlos Sanchez made changes -
          Summary Original: Stash/unstash within a container doesn't keep file attributes New: Stash/unstash within a Alpine container doesn't keep file attributes
          Vivek Pandey made changes -
          Labels Original: regression New: regression triaged-2018-11
          Jesse Glick made changes -
          Assignee Original: Carlos Sanchez [ csanchez ]
          Thierry Wasylczenko made changes -
          Link New: This issue blocks JENKINS-16752 [ JENKINS-16752 ]
          Thierry Wasylczenko made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            Unassigned Unassigned
            pascallap Pascal Laporte
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: