sh block on Windows container failed to copy script.sh.copy resulted in No such file or directory

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

XMLWordPrintable

      In this commit, the change added `cp '%s' '%s'` which resulted in failed run on Windows docker container, but success on Windows agent (EC2 host) specifically.

      https://github.com/jenkinsci/durable-task-plugin/commit/b4613ba616bae5901edc1c8bd3cf2c714fd00e2b

       

      Error logs:

      ```

      sh: C:/Users/Administrator/jenkins/workspace/windows-test@tmp/durable-4797526d/script.sh.copy: No such file or directory

      ```

       

      Example jenkinsfile:

      ```

      pipeline {

        agent {

          docker

      {       label <WINDOWS_HOST>       image 'opensearchstaging/ci-runner:ci-runner-windows2019-opensearch-build-v1'       registryUrl '[https://public.ecr.aws/']       alwaysPull true     }

        }

        stages {

          stage('Hello') {

            steps

      {         sh 'pwd && ls -l'        }

            }

          }

      }

      ```

       

       

       

            Assignee:
            Unassigned
            Reporter:
            Peter
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: