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
- 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
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
Assessment
This issue has not been assessed yet.