40 lines
952 B
YAML
40 lines
952 B
YAML
# https://dev.azure.com/home-assistant
|
|
|
|
trigger:
|
|
branches:
|
|
include:
|
|
- master
|
|
pr:
|
|
- master
|
|
|
|
variables:
|
|
- name: versionHadolint
|
|
value: 'v1.17.2'
|
|
- name: versionShellCheck
|
|
value: "v0.7.0"
|
|
|
|
jobs:
|
|
|
|
- job: 'Hadolint'
|
|
pool:
|
|
vmImage: 'ubuntu-latest'
|
|
steps:
|
|
- script: sudo docker pull hadolint/hadolint:$(versionHadolint)
|
|
displayName: 'Install Hadolint'
|
|
- script: |
|
|
sudo docker run --rm -i \
|
|
-v $(pwd)/.hadolint.yaml:/.hadolint.yaml:ro \
|
|
hadolint/hadolint:$(versionHadolint) < Dockerfile
|
|
displayName: 'Run Hadolint'
|
|
|
|
- job: "ShellCheck"
|
|
pool:
|
|
vmImage: "ubuntu-latest"
|
|
steps:
|
|
- script: sudo docker pull koalaman/shellcheck:$(versionShellCheck)
|
|
displayName: "Install ShellCheck"
|
|
- script: |
|
|
shopt -s globstar
|
|
sudo docker run --rm -i \
|
|
-v $(pwd):/mnt:ro koalaman/shellcheck:$(versionShellCheck) -s bash **/{*.sh,run}
|
|
displayName: "Run ShellCheck" |