From 0fb9102e69399ebbfb043a7b728ebd7a1d8af0e5 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 9 May 2019 10:00:51 +0200 Subject: [PATCH] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..073cb008f --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,52 @@ +# https://dev.azure.com/home-assistant + +trigger: + batch: true + branches: + include: + - dev + tags: + include: + - '*' + exclude: + - untagged* +pr: +- dev + +variables: + - name: versionHadolint + value: 'v1.16.3' + - name: versionShellCheck + value: 'v0.6.0' + +jobs: + +- job: 'Hadolint' + pool: + vmImage: 'ubuntu-16.04' + 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-16.04' + steps: + - script: sudo docker pull koalaman/shellcheck:$(versionShellCheck) + displayName: 'Install ShellCheck' + - script: | + sudo docker run --rm -i \ + -v $(pwd):/mnt:ro koalaman/shellcheck:$(versionShellCheck) \ + scripts/*.sh \ + buildroot-external/scripts/*.sh \ + buildroot-external/board/**/*.sh \ + buildroot-external/rootfs-overlay/usr/sbin/* \ + buildroot-external/rootfs-overlay/usr/libexec/* \ + buildroot-external/rootfs-overlay/usr/lib/rauc/* + displayName: 'Run ShellCheck'