mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Update azure-pipelines.yml for Azure Pipelines
This commit is contained in:
parent
a9c85b9944
commit
dedc2ef918
@ -16,6 +16,7 @@ variables:
|
|||||||
- group: docker
|
- group: docker
|
||||||
- group: wheels
|
- group: wheels
|
||||||
- group: github
|
- group: github
|
||||||
|
- group: twine
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -24,7 +25,7 @@ jobs:
|
|||||||
condition: eq(variables['Build.SourceBranchName'], 'dev')
|
condition: eq(variables['Build.SourceBranchName'], 'dev')
|
||||||
timeoutInMinutes: 360
|
timeoutInMinutes: 360
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-16.04'
|
vmImage: 'ubuntu-latest'
|
||||||
strategy:
|
strategy:
|
||||||
maxParallel: 3
|
maxParallel: 3
|
||||||
matrix:
|
matrix:
|
||||||
@ -114,15 +115,53 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
displayName: 'Check version of branch/tag'
|
displayName: 'Check version of branch/tag'
|
||||||
|
- script: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y --no-install-recommends \
|
||||||
|
jq curl
|
||||||
|
|
||||||
|
release="$(Build.SourceBranchName)"
|
||||||
|
created_by="$(curl -s https://api.github.com/repos/home-assistant/home-assistant/releases/tags/${release} | jq --raw-output '.author.login')"
|
||||||
|
|
||||||
|
if [[ "${created_by}" =~ ^(balloob|pvizeli|fabaff|robbiet480)$ ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${created_by} is not allowed to create an release!"
|
||||||
|
exit 1
|
||||||
|
displayName: 'Check rights'
|
||||||
|
|
||||||
|
|
||||||
- job: 'Release'
|
- job: 'ReleasePython'
|
||||||
|
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('VersionValidate'))
|
||||||
|
dependsOn:
|
||||||
|
- 'VersionValidate'
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-latest'
|
||||||
|
steps:
|
||||||
|
- task: UsePythonVersion@0
|
||||||
|
displayName: 'Use Python 3.7'
|
||||||
|
inputs:
|
||||||
|
versionSpec: '3.7'
|
||||||
|
- script: pip install twine
|
||||||
|
displayName: 'Install twine'
|
||||||
|
- script: python setup.py sdist bdist_wheel
|
||||||
|
displayName: 'Build package'
|
||||||
|
- script: |
|
||||||
|
export TWINE_USERNAME="$(twineUser)"
|
||||||
|
export TWINE_PASSWORD="$(twinePassword)"
|
||||||
|
|
||||||
|
twine upload dist/* --skip-existing
|
||||||
|
displayName: 'Upload pypi'
|
||||||
|
|
||||||
|
|
||||||
|
- job: 'ReleaseDocker'
|
||||||
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('VersionValidate'))
|
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('VersionValidate'))
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- 'VersionValidate'
|
- 'VersionValidate'
|
||||||
timeoutInMinutes: 120
|
timeoutInMinutes: 120
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-16.04'
|
vmImage: 'ubuntu-latest'
|
||||||
strategy:
|
strategy:
|
||||||
maxParallel: 5
|
maxParallel: 5
|
||||||
matrix:
|
matrix:
|
||||||
@ -167,16 +206,17 @@ jobs:
|
|||||||
displayName: 'Build Release'
|
displayName: 'Build Release'
|
||||||
|
|
||||||
|
|
||||||
- job: 'ReleasePublish'
|
- job: 'ReleaseHassio'
|
||||||
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('Release'))
|
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('ReleaseDocker'))
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- 'Release'
|
- 'ReleaseDocker'
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-16.04'
|
vmImage: 'ubuntu-latest'
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
|
sudo apt-get update
|
||||||
sudo apt-get install -y --no-install-recommends \
|
sudo apt-get install -y --no-install-recommends \
|
||||||
git jq
|
git jq curl
|
||||||
|
|
||||||
git config --global user.name "Pascal Vizeli"
|
git config --global user.name "Pascal Vizeli"
|
||||||
git config --global user.email "pvizeli@syshack.ch"
|
git config --global user.email "pvizeli@syshack.ch"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user