From 3d79688ffdfca7f1af3e8ea28ece33c803229851 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Fri, 8 May 2020 16:50:46 +0200 Subject: [PATCH] Update azure-pipelines.yaml --- azure-pipelines.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 8833c42b..95fbeee2 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -76,15 +76,14 @@ steps: displayName: 'Docker build release' condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'), ne(variables['Build.Reason'], 'PullRequest')) +# Trigger downstream # Trigger downstream - bash: | - BODY="{\"request\": {\"branch\": \"master\"}}" - curl -s -X POST \ - -H "Content-Type: application/json" \ - -H "Accept: application/json" \ - -H "Travis-API-Version: 3" \ - -H "Authorization: token $(TRAVIS_TOKEN)" \ - -d "$BODY" \ - "https://api.travis-ci.org/repo/danielwelch%2Fhassio-zigbee2mqtt/requests" + curl -s \ + --request POST \ + --header "Content-Type: application/json" \ + --data '{"definition": {"id": 1}}' \ + -u "$(HASSIO_TRIGGER_SECRET)" \ + "https://dev.azure.com/danielwelch2101/hassio-zigbee2mqtt/_apis/build/builds?api-version=5.1" displayName: 'Trigger Hass.io build' condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/dev'), ne(variables['Build.Reason'], 'PullRequest'))