Update build pipeline

This commit is contained in:
Pascal Vizeli 2019-07-09 15:32:09 +02:00
parent 3ce1049d21
commit 25745e9e27

View File

@ -8,16 +8,17 @@ trigger:
pr: none pr: none
variables: variables:
- name: versionBuilder - name: versionBuilder
value: '4.5' value: '5.1'
- group: docker - group: docker
- group: github - group: github
- group: twine - group: twine
jobs: stages:
- stage: 'Validate'
- job: 'VersionValidate' jobs:
- job: 'VersionValidate'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags') condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
pool: pool:
vmImage: 'ubuntu-latest' vmImage: 'ubuntu-latest'
@ -50,8 +51,9 @@ jobs:
exit 1 exit 1
displayName: 'Check rights' displayName: 'Check rights'
- stage: 'Build'
- job: 'ReleasePython' jobs:
- job: 'ReleasePython'
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('VersionValidate')) condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('VersionValidate'))
dependsOn: dependsOn:
- 'VersionValidate' - 'VersionValidate'
@ -72,9 +74,7 @@ jobs:
twine upload dist/* --skip-existing twine upload dist/* --skip-existing
displayName: 'Upload pypi' displayName: 'Upload pypi'
- job: 'ReleaseDocker'
- 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'
@ -124,8 +124,9 @@ jobs:
-t machine --docker-hub homeassistant -t machine --docker-hub homeassistant
displayName: 'Build Release' displayName: 'Build Release'
- stage: 'Publish'
- job: 'ReleaseHassio' jobs:
- job: 'ReleaseHassio'
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('ReleaseDocker')) condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('ReleaseDocker'))
dependsOn: dependsOn:
- 'ReleaseDocker' - 'ReleaseDocker'