Created
May 27, 2020 12:52
-
-
Save aheumaier/008fa452cbddf24517b27861fc9b304e to your computer and use it in GitHub Desktop.
Enable shellcheck in your Azure Pipelines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Starter pipeline | |
# Start with a minimal pipeline that you can customize to build and deploy your code. | |
# Add steps that build, run tests, deploy, and more: | |
# https://aka.ms/yaml | |
trigger: | |
- master | |
pool: | |
vmImage: 'ubuntu-18.04' | |
steps: | |
- checkout: self | |
submodules: true | |
- bash: | | |
echo "This checks for formatting and common bash errors. See wiki for error details and ignore options: https://github.com/koalaman/shellcheck/wiki/SC1000" | |
export scversion="stable" | |
wget -qO- "https://storage.googleapis.com/shellcheck/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv | |
mv "shellcheck-${scversion}/shellcheck" . | |
rm -r "shellcheck-${scversion}" | |
./shellcheck ./scripts/*.sh | |
displayName: "Validate Scripts: Shellcheck" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The shellcheck archive URL has changed.
Also, it is possible to run the scripts on a
windows-2019
orwindows-latest
host, just have to usecurl
instead ofwget
.