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

container step "script returned exit code -1"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • kubernetes-plugin
    • None
    • kubernetes plugin v0.12 or current master
      Jenkins 2.62
      container step running in a _debian_ container

      podTemplate(name: "mypod", label: "label", containers: [
                              containerTemplate(name: 'debian',
                                      image: 'debian',
                                      ttyEnabled: true,
                                      command: 'cat',
                              )
      ]) {
          node("label") {
              container('debian') {
                  sh 'for i in $(seq 1 1000); do echo $i; sleep 0.3; done'
              }
          }
      }
      

      leads to

      [Pipeline] podTemplate
      [Pipeline] {
      [Pipeline] node
      Running on horst-nwmsn-32h5h in /home/jenkins/workspace/full
      [Pipeline] {
      [Pipeline] container
      [Pipeline] {
      [Pipeline] sh
      [full] Running shell script
      + seq 1 1000
      + echo 1
      1
      + sleep 0.3
      + echo 2
      2
      + sleep 0.3
      [Pipeline] }
      [Pipeline] // container
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] }
      [Pipeline] // podTemplate
      [Pipeline] End of Pipeline
      ERROR: script returned exit code -1
      Finished: FAILURE
      

      Sometimes it fails a bit faster.

      Might be related to the script being started with "nohup" now.

            0x89 Martin Sander
            0x89 Martin Sander
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: