jenkinsci / jenkinsci/docker-workflow-plugin
[JENKINS-54407] docker exec fails within docker.image.inside because of empty environment variable name
- Dominant language
- Java
- Stars
- 527
- Forks
- 422
- Avg merge
- 10m
- Merged PRs (30d)
- 1
Description
There is an environment variable from unknown source which has an empty name. Jenkins would run a docker exec command to execute the content of an sh step within a docker.image.inside block. The docker exec command fails because of the environment variable.
I have written a wrapper bash script around the docker command which filters out the empty environment variable name. With this script in place the same Jenkinsfile runs sucessfully.
The environment variable does not appear on the global configure system page, neither on the agent page. Its value is 'build'.
---
Originally reported by
hontvari, imported from: docker exec fails within docker.image.inside because of empty environment variable name
Raw content of original issue
There is an environment variable from unknown source which has an empty name. Jenkins would run a docker exec command to execute the content of an sh step within a docker.image.inside block. The docker exec command fails because of the environment variable.
I have written a wrapper bash script around the docker command which filters out the empty environment variable name. With this script in place the same Jenkinsfile runs sucessfully.
The environment variable does not appear on the global configure system page, neither on the agent page. Its value is 'build'.
- environment:
Jenkins ver. 2.138.2
Contributor guide
Assessment
This issue has not been assessed yet.