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

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

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'        }

            }

          }

      }

      ```

       

       

       

            Unassigned Unassigned
            peterzhu1992 Peter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: