Created
November 21, 2014 10:23
-
-
Save jincod/03ed02181c83faf93081 to your computer and use it in GitHub Desktop.
Get changes from TeamCity build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$buildId = 10048 | |
$teamcityUrl = "http://teamcity:8080" | |
$auth = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("username:password")) | |
@((Invoke-RestMethod $teamcityUrl/httpAuth/app/rest/changes?build=id:$buildId -Headers @{"Authorization" = "Basic $auth"}).changes.change) | % { (Invoke-RestMethod $teamcityUrl/httpAuth/app/rest/changes/id:$($_.id) -Headers @{"Authorization" = "Basic $auth"}).change.comment} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment