diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 29e68a5d7ac..51c5cdb936d 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -233,3 +233,36 @@ stages: fi displayName: 'Create Meta-Image' + +- stage: 'Addidional' + jobs: + - job: 'Updater' + pool: + vmImage: 'ubuntu-latest' + variables: + - group: gcloud + steps: + - template: templates/azp-step-ha-version.yaml@azure + - script: | + set -e + export CLOUDSDK_CORE_DISABLE_PROMPTS=1 + curl -o google-cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz + tar -C . -xvf google-cloud-sdk.tar.gz + rm -f google-cloud-sdk.tar.gz + ./google-cloud-sdk/install.sh + displayName: 'Setup gCloud' + condition: eq(variables['homeassistantReleaseStable'], 'true')) + - script: | + set -e + export CLOUDSDK_CORE_DISABLE_PROMPTS=1 + echo "$(gcloudAuth)" > gcloud_auth.json + ./google-cloud-sdk/bin/gcloud auth activate-service-account --key-file gcloud_auth.json + rm -f gcloud_auth.json + displayName: 'Auth gCloud' + condition: eq(variables['homeassistantReleaseStable'], 'true')) + - script: | + set -e + export CLOUDSDK_CORE_DISABLE_PROMPTS=1 + ./google-cloud-sdk/bin/gcloud functions deploy Analytics-Receiver --update-env-vars VERSION=$(homeassistantRelease) + displayName: 'Push details to updater' + condition: eq(variables['homeassistantReleaseStable'], 'true'))