Implement azure artifact downloader
This commit is contained in:
commit
a9e7737024
5 changed files with 101 additions and 0 deletions
15
listBuilds.ps1
Normal file
15
listBuilds.ps1
Normal file
|
@ -0,0 +1,15 @@
|
|||
function ListBuilds {
|
||||
Param (
|
||||
[string]$token,
|
||||
[string]$instance,
|
||||
[string]$project
|
||||
)
|
||||
Process {
|
||||
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
|
||||
$headers.Add("Authorization", "Basic $token")
|
||||
$headers.Add("Cookie", "VstsSession=%7B%22PersistentSessionId%22%3A%22358fb34b-2e05-46fc-9452-287c2986ac02%22%2C%22PendingAuthenticationSessionId%22%3A%2200000000-0000-0000-0000-000000000000%22%2C%22CurrentAuthenticationSessionId%22%3A%2200000000-0000-0000-0000-000000000000%22%2C%22SignInState%22%3A%7B%7D%7D")
|
||||
$url = "https://$instance/$project/_apis/build/builds?api-version=7.1-preview.7"
|
||||
$response = Invoke-RestMethod $url -Method 'GET' -Headers $headers
|
||||
return $response
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue