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

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

XMLWordPrintable

      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.   

       

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

              Created:
              Updated:
              Resolved: