Container tasks (ContainerExecDecorator) not starting on Windows pods

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Blocker
    • Component/s: kubernetes-plugin
    • Environment:

      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!"
          }
        }
      }
      

            Assignee:
            Unassigned
            Reporter:
            Scott Leerssen
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: