Change logic for downloading zip files based on job id (#7653)

This commit is contained in:
James Truher [MSFT]
2018-08-30 11:23:19 -07:00
committed by Aditya Patwardhan
parent 5c2faaf02e
commit bc1aac78d3
@@ -121,9 +121,14 @@ Write-LogPassThru -Message "***** New Run *****"
Write-LogPassThru -Message "Forcing winrm quickconfig as it is required for remoting tests."
winrm quickconfig -force
$codeCoverageZip = 'https://ci.appveyor.com/api/projects/PowerShell/powershell-f975h/artifacts/CodeCoverage.zip'
$testContentZip = 'https://ci.appveyor.com/api/projects/PowerShell/powershell-f975h/artifacts/tests.zip'
$openCoverZip = 'https://ci.appveyor.com/api/projects/PowerShell/powershell-f975h/artifacts/OpenCover.zip'
$appVeyorUri = "https://ci.appveyor.com/api"
$project = Invoke-RestMethod -Method Get -Uri "${appVeyorUri}/projects/PowerShell/powershell-f975h"
$jobId = $project.build.jobs[0].jobId
$appVeyorBaseUri = "${appVeyorUri}/buildjobs/${jobId}/artifacts"
$codeCoverageZip = "${appVeyorBaseUri}/CodeCoverage.zip"
$testContentZip = "${appVeyorBaseUri}/tests.zip"
$openCoverZip = "${appVeyorBaseUri}/OpenCover.zip"
Write-LogPassThru -Message "codeCoverageZip: $codeCoverageZip"
Write-LogPassThru -Message "testcontentZip: $testContentZip"