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
# ----------------------------------------------- | |
# Xdt Config Transform | |
# ----------------------------------------------- | |
# | |
# Ver Who When What | |
# 1.0 Evolve Software 11-08-16 Initial Version | |
# Script Input Parameters | |
param ( | |
[ValidateNotNullOrEmpty()] |
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
# ----------------------------------------------- | |
# Sign Assembly using Nivot | |
# ----------------------------------------------- | |
# | |
# Ver Who When What | |
# 1.0 Evolve Software Ltd 19-05-16 Initial Version | |
# Script Input Parameters | |
param ( | |
[ValidateNotNullOrEmpty()] |
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
# ----------------------------------------------- | |
# REST API Wrapper | |
# ----------------------------------------------- | |
# | |
# Ver Who When What | |
# 1.0 Evolve Software Ltd 11-08-16 Initial Version | |
# Script Input Parameters | |
param ( | |
[ValidateNotNullOrEmpty()] |
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
# Set Build Configuration Id of the one we want to set the trigger on | |
$BuildTypeId = "StackOverflowSamples_TriggerSecondBuildAfterXDays_AfterXDaysBuild" | |
$NumberOfDays = 3 | |
# Create Credentials using built in user / password | |
$ApiCredentials = New-Object System.Management.Automation.PSCredential("admin", (ConvertTo-SecureString "admin" -AsPlainText -Force)) | |
# Delete any existing triggers | |
Invoke-RestMethod -Credential $ApiCredentials -Uri "%teamcity.serverUrl%/httpAuth/app/rest/buildTypes/id:$BuildTypeId/triggers" -Method PUT -ContentType "application/xml" -Body "<triggers/>"; |
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
# Set Build Configuration Id | |
$BuildTypeId = "BuildConfiguration_Name" | |
# Create Credentials using built in user / password | |
$ApiCredentials = New-Object System.Management.Automation.PSCredential("%system.teamcity.auth.userId%", (ConvertTo-SecureString "%system.teamcity.auth.password%" -AsPlainText -Force)) | |
# Invoke and get status | |
$status = Invoke-RestMethod -Credential $ApiCredentials -Uri "%teamcity.serverUrl%/httpAuth/app/rest/builds/buildType:$BuildTypeId/status" -Method GET; |