forked from home-assistant/addons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
56 lines (49 loc) · 1.27 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# https://dev.azure.com/home-assistant
trigger:
branches:
include:
- master
pr:
- master
variables:
versionHadolint: 'v1.16.3'
versionShellCheck: 'v0.6.0'
jobs:
- job: 'Hadolint'
pool:
vmImage: 'ubuntu-16.04'
steps:
- script: sudo docker pull hadolint/hadolint:$(versionHadolint)
displayName: 'Install Hadolint'
- script: |
set -e
shopt -s globstar
for dockerfile in **/Dockerfile
do
echo "Linting: $dockerfile"
sudo docker run --rm -i \
-v $(pwd)/.hadolint.yaml:/.hadolint.yaml:ro \
hadolint/hadolint:$(versionHadolint) < "$dockerfile"
done
displayName: 'Run Hadolint'
- job: 'ShellCheck'
pool:
vmImage: 'ubuntu-16.04'
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) **/*.sh
displayName: 'Run ShellCheck'
- job: 'JQ'
pool:
vmImage: 'ubuntu-16.04'
steps:
- script: sudo apt-get install -y jq
displayName: 'Install JQ'
- bash: |
shopt -s globstar
cat **/*.json | jq '.'
displayName: 'Run JQ'