I am trying to execute an azure pipeline. It was executing fine. But when I added a task to conditionally check pom.xml file exists then only I need to execute that particular task, but it fails
Error
CodePudding user response:
Your script needs to be more indented:
- bash: |
if [ -f Maven pom.xml ]; then
echo "##vso[task.setVariable variable=FILEEXISTS]true"
fi
- task: Maven@3
etc
See an example here: https://stackoverflow.com/a/58555822/174843