You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DevOps-Bash-tools/azure-pipelines.yml

42 lines
1.2 KiB
YAML

# vim:ts=2:sts=2:sw=2:et
#
# Author: Hari Sekhon
# Date: Sun Feb 23 19:02:10 2020 +0000
#
# https://github.com/harisekhon/bash-tools
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback
# to help improve or steer this or other code I publish
#
# http://www.linkedin.com/in/harisekhon
#
# https://aka.ms/yaml
trigger:
- master
pool:
# there is no /dev/stderr on this azure build!
#vmImage: 'ubuntu-latest'
# Ubuntu 16.04 required for docker container support, looks like 18.04 works too
vmImage: 'ubuntu-18.04'
# unprivileged container without sudo, cannot install dependencies
#container: ubuntu:18.04
steps:
# doesn't work due to lack of sudo
#- script: sudo apt-get update && sudo apt-get install -y git make
# displayName: install git & make
#- script: make
# displayName: build
#- script: make test
# displayName: test
# hacky workaround to Azure Pipelines limitations :-(
- script: sudo docker run -v "$PWD":/pwd ubuntu:18.04 /bin/bash -c "set -ex && cd /pwd && apt update && apt install -y git make && make default test"
displayName: docker build