From d8f6c80696f354c257614450f66de813044fb854 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Thu, 27 Dec 2018 22:56:39 +0100 Subject: [PATCH] Fix: [AzurePipelines] download Windows Dependencies from GitHub Releases It turns out that Azure Pipelines has a lot of issues downloading an artifact from your own project if it is triggered from a fork. From what I could deduce, this is because the API requires a valid token, which is not set (correctly?) when triggered from a fork. As it is nicer anyway to publish the Windows Dependencies on GitHub, it is now published there (and updated at least every week), and we use the files from GitHub as our dependency. --- azure-pipelines-ci.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/azure-pipelines-ci.yml b/azure-pipelines-ci.yml index d9404da5fb..ea7f355141 100644 --- a/azure-pipelines-ci.yml +++ b/azure-pipelines-ci.yml @@ -25,14 +25,13 @@ jobs: git config user.name 'OpenTTD CI' git rebase origin/master displayName: 'Rebase to master' - - task: DownloadBuildArtifacts@0 + - bash: | + set -ex + curl -L https://github.com/OpenTTD/OpenTTD-CF/releases/download/latest/windows-dependencies.zip > windows-dependencies.zip + unzip windows-dependencies.zip + rm -f windows-dependencies.zip displayName: 'Download dependencies' - inputs: - buildType: specific - project: '8da578ca-c6cf-47b8-b489-d54a7b188de8' - pipeline: 2 - artifactName: 'windows-dependencies' - downloadPath: '$(Build.ArtifactStagingDirectory)' + workingDirectory: $(Build.ArtifactStagingDirectory) - script: $(Build.ArtifactStagingDirectory)\windows-dependencies\vcpkg.exe integrate install displayName: 'Install dependencies' - task: VSBuild@1