Introduction
my setup , azure devops hosted on prem, and windows server hosting all the agent.
How to Run the bash script using azure devops pipeline. ?
- Add a script and task is easier part.
- Make sure the bash script which is added to repository should be created by a linux system and have the permission to execute.
chmod +x test.sh
- Sample bash Script :
#!/bin/bash
echo "-----------------------------------------------------"
git rev-list HEAD -1
git rev-list HEAD | wc -l
- Make sure Git bash is installed in the Windows Server where our Windows Agents are stored, also make sure the path of the git bash is added to the environment variable.
make sure to restart the agent after the path is update
- Now lets see how the bash task looks in the piplein
Let me know if you guys faced any other issues, other than this mentioned in the blogpost. :)