-
Bug
-
Resolution: Duplicate
-
Minor
-
Jenkins 2.298, Docker Pipeline 1.26, Durable Task Plugin 1.37
We've been trying to get scripted pipelines to run steps inside docker images for a while now. Steps like bat, powershell, pswh, etc. would cause the build to hang.
After a lot of investigation the issue is soo easy to reproduce!
In Jenkins under "Configure System" > "Global properties" > "Environment variables" we had a variable that contained quotes and a space. Example: "C:\Program Files\Red Gate\SmartAssembly 7\SmartAssembly.com"
Here's a snippet from our Jenkinsfile:
stage('build') { echo "On agent" docker.build("${appName}:${env.BUILD_ID}").inside { echo "In docker" bat 'echo running inside docker' // This will hang the build } }
(Note: Using docker.image had the same result.)
Removing the environment variable resolves the issue.
- duplicates
-
JENKINS-64751 Environment variables with a trailing double quotes are not escaped correctly on Windows
- Resolved