-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Azure Pipelines
John Gardner edited this page Dec 22, 2021
·
2 revisions
ShellCheck is installed by default on the ubuntu-latest
host in Azure Pipelines. To see all installed software, consult the Azure documentation.
Trying to run ShellCheck as usual within the pipeline will produce an error:
$ shellcheck myscripts/*.sh
myscripts/*.sh: myscripts/*.sh: openBinaryFile: does not exist (No such file or directory)
The recommended approach is to use find
to search the files and pass a list of those to ShellCheck:
$ shellcheck $(find $(pwd)/myscripts/ -name "*.sh")
Copy the following YAML to run ShellCheck in Azure Pipelines against all *.sh
files in the current directory:
trigger:
- master
jobs:
- job: shellcheck
displayName: ShellCheck
pool:
vmImage: 'ubuntu-latest'
steps:
- script: shellcheck $(find $(pwd) -name "*.sh")
displayName: 'Running ShellCheck'