I have the below command in my Jenkinsfile:

docker run --rm -v "${WORKSPACE}":/var/cache/de --entrypoint=/usr/local/bin/pytest ${IMAGE_NAME}:${IMAGE_VERSION} -m "not require_dss" -s -v --cov-report term --cov=app_dss_bundle --junitxml=/var/cache/de/rtest.xml tests

ls -l

I'm running inside docker slave, so it means its docker inside docker. I can't see the rtest.xml in the WORKSPACE afterward (it works for me in my private linux docker env). I already tried to run the suggestion of -v /var/run/docker.sock:/var/run/docker.sock but it didn't help. any other idea?

  • Any other suggestion?
    – arielma
    Nov 26, 2020 at 19:12

1 Answer 1


Single quotes in shell meant to leave the enclosed string 'as is'. That is the variable inside single quotes isn't going to be evaluated. Try changing '${WORKSPACE}' for "${WORKSPACE}".

  • I tried all the options, it didn't help
    – arielma
    Nov 25, 2020 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.