0

We have this workspace and subdirectory: $WORKSPACE/Refrens data/11. metadata/file.xml

in Jenkins section Execute Shell we have this code:

DEPLOY_FILE=$WORKSPACE/Refrens data/11. metadata/file.xml

if [[ -s $DEPLOY_FILE ]];
   then
    echo "$WORKSPACE/$DEPLOY_FILE exits in Bitbucket"
    echo ""
  else
    echo "$WORKSPACE/$DEPLOY_FILE does not exits in Bitbucket"
    exit 1;
 fi

When building it says that this file does not exist and the else part is executed

$WORKSPACE/Referens data/11. metadata/file.xml does not exist in Bitbucket

But our file exist! I think Jenkins does not understand space in the directory names Reference data and 11. metadata how do I fix it?

pyramid13
  • 266
  • 1
  • 5
  • 21
  • 1
    It is not a Jenkins issue, but rather a shell limitation. Take a look at [how-to-input-a-path-with-a-white-space](https://stackoverflow.com/questions/12902227/how-to-input-a-path-with-a-white-space/12902280) – Noam Helmer Nov 18 '21 at 17:19
  • 1
    @NoamHelmer, yep you're right and this is not Jenkins issue even not shell issue, the problem was with the input file that I had created in Windows. – pyramid13 Nov 19 '21 at 03:36

0 Answers0