mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-25 18:16:32 +00:00
Update azure-pipelines.yml for Azure Pipelines (#1037)
* Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines
This commit is contained in:
parent
f35dcfcfd3
commit
7d42dd7ac2
@ -1,7 +1,4 @@
|
|||||||
# Python package
|
# https://dev.azure.com/home-assistant
|
||||||
# Create and test a Python package on multiple Python versions.
|
|
||||||
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
|
|
||||||
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
- master
|
- master
|
||||||
@ -14,34 +11,55 @@ jobs:
|
|||||||
|
|
||||||
- job: 'Tox'
|
- job: 'Tox'
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads')
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads')
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-16.04'
|
vmImage: 'ubuntu-16.04'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: UsePythonVersion@0
|
- task: UsePythonVersion@0
|
||||||
displayName: 'Use Python $(python.version)'
|
displayName: 'Use Python $(python.version)'
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: '3.7'
|
versionSpec: '3.7'
|
||||||
|
|
||||||
- script: pip install tox
|
- script: pip install tox
|
||||||
displayName: 'Install Tox'
|
displayName: 'Install Tox'
|
||||||
|
|
||||||
- script: tox
|
- script: tox
|
||||||
displayName: 'Run Tox'
|
displayName: 'Run Tox'
|
||||||
|
|
||||||
|
|
||||||
- job: 'JQ'
|
- job: 'JQ'
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads')
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads')
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-16.04'
|
vmImage: 'ubuntu-16.04'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- script: sudo apt-get install -y jq
|
- script: sudo apt-get install -y jq
|
||||||
displayName: 'Install JQ'
|
displayName: 'Install JQ'
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
shopt -s globstar
|
shopt -s globstar
|
||||||
cat **/*.json | jq '.'
|
cat **/*.json | jq '.'
|
||||||
displayName: 'Run JQ'
|
displayName: 'Run JQ'
|
||||||
|
|
||||||
|
|
||||||
|
- job: 'Release'
|
||||||
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-16.04'
|
||||||
|
strategy:
|
||||||
|
maxParallel: 4
|
||||||
|
matrix:
|
||||||
|
amd64:
|
||||||
|
buildArch: 'amd64'
|
||||||
|
i386:
|
||||||
|
buildArch: 'i386'
|
||||||
|
armhf:
|
||||||
|
buildArch: 'armhf'
|
||||||
|
armv7:
|
||||||
|
buildArch: 'armv7'
|
||||||
|
aarch64:
|
||||||
|
buildArch: 'aarch64'
|
||||||
|
steps:
|
||||||
|
- script: sudo docker pull homeassistant/amd64-builder
|
||||||
|
displayName: 'Install Builder'
|
||||||
|
- script: |
|
||||||
|
sudo docker run --rm --privileged \
|
||||||
|
-v ~/.docker:/root/.docker -v $(pwd):/data \
|
||||||
|
homeassistant/amd64-builder --supervisor "--$(buildArch)" \
|
||||||
|
-t /data --docker-hub homeassistant
|
||||||
|
displayName: 'Run build'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user