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

stash fails in kubernetes container

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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
       

        Attachments

          Issue Links

            Activity

            Hide
            jknurek J Knurek added a comment -

            not critical, the workaround is excluding the nohup.out file:

            stash excludes: 'nohup.out', name: 'test'

            Show
            jknurek J Knurek added a comment - not critical, the workaround is excluding the nohup.out file: stash excludes: 'nohup.out', name: 'test'
            Hide
            0x89 Martin Sander added a comment - - edited
            Show
            0x89 Martin Sander added a comment - - edited "caused" by the fix for JENKINS-42048 , https://github.com/jenkinsci/kubernetes-plugin/pull/157/files

              People

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

                Dates

                Created:
                Updated:
                Resolved: