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

Container tasks (ContainerExecDecorator) not starting on Windows pods

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: kubernetes-plugin
    • Environment:
    • Similar Issues:

      Description

      When attempting to run a command using either the `bat` or `powershell` commands inside a `container()` block, the resulting durable-task script wrapper created in the container is not being run.  I can exec into the container and run it manually, and the resulting output is picked up by Jenkins and the pipeline moves on.  Nothing in the Jenkins log indicates any kind issue trying to run the command.  Commands outside the container block run fine.  The following is the node block I have (nothing fancy):

      node(label) {
        try {
          notifySlack()
          def myRepo = checkout scm
          def gitCommit = myRepo.GIT_COMMIT
          def gitBranch = myRepo.GIT_BRANCH
      
          stage("hello windows") {
            bat "dir /a"
            container(name:'windows-1809') {
                println "really want to do a dir here..."
                bat "dir /w"
                bat "set"
            }
          }
        } catch (e) {
          currentBuild.result = 'FAILURE'
          throw e
        }
        finally {
          notifySlack(currentBuild.result)
          stage("cleanup") {
            print "all done!"
          }
        }
      }
      

        Attachments

          Activity

          Hide
          sleerssen Scott Leerssen added a comment -

          I updated our Kubernetes plugin to the latest (1.25.7) and the container execs now work as desired.

          Show
          sleerssen Scott Leerssen added a comment - I updated our Kubernetes plugin to the latest (1.25.7) and the container execs now work as desired.
          Hide
          sleerssen Scott Leerssen added a comment -

          Updated plugin to 1.25.7 and problem went away

          Show
          sleerssen Scott Leerssen added a comment - Updated plugin to 1.25.7 and problem went away

            People

            • Assignee:
              Unassigned
              Reporter:
              sleerssen Scott Leerssen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: