jenkinsci / jenkinsci/durable-task-plugin

[JENKINS-73202] sh block on Windows container failed to copy script.sh.copy resulted in No such file or directory

Open
#509 1 comment 0 reactions 0 assignees View on GitHub
component:durable-task-plugin imported-jira-issue pipeline priority:minor resolution:unresolved
Dominant language
Java
Stars
30
Forks
101
PR merge metrics
No merged PRs in 30d

Description

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

      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'

       }

      }

    }

}

```

 

 

 

---
Originally reported by peterzhu1992, imported from: sh block on Windows container failed to copy script.sh.copy resulted in No such file or directory


  • status: Open
  • priority: Minor
  • component(s): durable-task-plugin
  • label(s): jenkins, pipeline, plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-09

Raw content of original issue

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'

       }

      }

    }

}

```

 

 

 

  • environment: Jenkins 2.440.2, durable-task-plugin 550.v0930093c4b_a_6 and up.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.