Search code examples
dockershellazure-devopsazure-devops-pipelinesazure-devops-self-hosted-agent

Unable to run Azure DevOps shell script tasks on Docker-Linux agent


I have a shell script (file.sh) with echo message. Created self hosted agent in a Linux container with the help of Microsoft documentation.

Created a pipeline job with "Bash" task to run the shell script (file.sh).

End up with no outcome, though build successful. no error, no outcome on console. PFB error screen. please suggest.

enter image description here

enter image description here

Note: I am able to run same shell script from inside (docker exec -ti bash) the container.


Solution

  • Fixed this by making shell script executable (chmod +x file.sh) before commit and push it to git repo.