Get-TFSBuildArtifacts.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Author: Miodrag Milic <miodrag.milic@gmail.com>
# Last Change: 14-Apr-2016.

<#
.SYNOPSIS
    Get the build artifacts
#>

function Get-TFSBuildArtifacts{
    [CmdletBinding()]
    param(
        #Build id
        [int]$Id
    )
    check_credential

    $uri = "$proj_uri/_apis/build/builds/$Id/artifacts?api-version=" + $global:tfs.api_version
    Write-Verbose "URI: $uri"

    $params = @{ Uri = $uri; Method = 'Get'}
    $r = invoke_rest $params
    $r.value
}