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

stash fails in kubernetes container

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • kubernetes-plugin
    • None

      This was working before version 0.12

      podTemplate(label: "base", 
      containers: [
      	containerTemplate(name: "go", image: "golang:1.8", ttyEnabled: true, command: "cat")
      ]) {
          node("base") {
          	container(name: "go") {
          		stage("stash fail"){
          		    sh "echo 'something' > ${WORKSPACE}/test.file"
          		    sh "ls -l"
          		    stash name: "test"
          		}
          	}
          }
      }
      

       

      Running on jenkins-slave-hpc81-cqk8x in /home/jenkins/workspace/test-stash
      [Pipeline] {
      [Pipeline] container
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (stash fail)
      [Pipeline] sh
      [test-stash] Running shell script
      + echo something
      [Pipeline] sh
      [test-stash] Running shell script
      + ls -l
      total 4
      -rw------- 1 root root  0 Aug  9 10:19 nohup.out
      -rw-r--r-- 1 root root 10 Aug  9 10:19 test.file
      [Pipeline] stash
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // container
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] }
      [Pipeline] // podTemplate
      [Pipeline] End of Pipeline
      java.nio.file.AccessDeniedException: /home/jenkins/workspace/test-stash/nohup.out
       

            Unassigned Unassigned
            jknurek J Knurek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: