Files
addons/azure-pipelines.yml
Pascal Vizeli a258fdc96d Fix certificate request logic & S6-Overlay (#1166)
* Fix certificate request logic (#1148)

* Fix Certbot logic

* Resolved multiple directory issue

* Only scan for directories

* Typo

* Quote the path passed to realpath

* Use find and awk and sort and tail instead of ls

* Add numeric flag to sort

* Remove unnecessary if..then in awk

* Update run.sh

* Update run.sh

* Update run.sh

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>

* S6-overlay

* Fix version

* Fix lint

* Fix check
2020-03-25 23:45:46 +01:00

55 lines
1.4 KiB
YAML

# https://dev.azure.com/home-assistant
trigger:
branches:
include:
- master
pr:
- master
variables:
versionHadolint: "v1.17.2"
versionShellCheck: "v0.7.0"
jobs:
- job: "Hadolint"
pool:
vmImage: "ubuntu-latest"
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-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"
- job: "JQ"
pool:
vmImage: "ubuntu-latest"
steps:
- script: sudo apt-get install -y jq
displayName: "Install JQ"
- bash: |
shopt -s globstar
cat **/*.json | jq '.'
displayName: "Run JQ"