1

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?

arielma
  • 339
  • 2
  • 9
  • 22

1 Answers1

2

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}".

anemyte
  • 223
  • 1
  • 4