Searching Queued Builds on a given Agent / Controller

Welcome Forums General PowerShell Q&A Searching Queued Builds on a given Agent / Controller

This topic contains 0 replies, has 1 voice, and was last updated by  Jaimin Modi 3 years, 3 months ago.

  • Author
  • #35201

    Topics: 1
    Replies: 0
    Points: 0
    Rank: Member

    I am trying to retrieve queued builds from TFS Server using the IBuildServer Interface. However I am not able to retrieve queued builds on specific agents for a given controller. That is required because if there is a build in progress the Cache Deletion should not happen.

    $tfsservername = 'TFS LINK'
    $server = new-object Microsoft.TeamFoundation.Client.TfsTeamProjectCollection(New-Object Uri($tfsservername)) 
    # creating TFSServer Instance
    $buildServer = $server.GetService([Microsoft.TeamFoundation.Build.Client.IBuildServer]) 
    $spec = $buildServer.CreateBuildQueueSpec('*','*')
    $build = $buildServer.QueryQueuedBuilds($spec).QueuedBuilds

    I tried searching for methods of IBuildServer but there is no method that links Agents and Queued Builds.

    I want to use IQueuedBuild Interface here but i don't know how to use it.

    Any suggestions how can i find Queued builds on an specific agent ?

The topic ‘Searching Queued Builds on a given Agent / Controller’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort