| I'm not sure if i get you correct, but in my understanding the problem is happening only on Windows host (master or slaves), when they try to start a Linux container with a Jenkins Pipeline as you wrote in the first comment. Are you exectuing the Test on a Windows host, with a Linux Docker Container? I don't get the point what you mean with 'cat', because if the commandline is correct, and Jenkins will start the Linux Container on the host, my expectation would be that it will run with the exactly same behaviour as if i would run it on my commandline on the host directly. For sure, now the Test Steps can not more run inside a cmd or bat command, because the jenkins should execute now the command as shell. But if we use the Jenkinsfile like this:
pipeline {
agent {
docker { image 'node:7-alpine' }
}
stages {
stage('Test') {
steps {
sh 'node --version'
}
}
}
}
then it is already written, that a Linux container is started, and inside the Linux node we call the command sh 'node --version'. In my understanding the challenge is to transfer the single 'sh' calls from a windows host where we have to use cmd to inside the docker container, and this via a opened cmd, where the docker container is already started. I'm currently not able to help here in coding, but it would be great to have a solution available which works, but what i can offer currently is the help to perform tests, if this would help here. Maybe also more would be possible, but i'm not familiar with the whole development environment for jenkins currently. |