This file contains hidden or 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
$server = "http://YOUR_SERVER" | |
$addTimestamp = $true | |
$includeConfigs = $true | |
$includeDatabase = $true | |
$includeBuildLogs = $true | |
$includePersonalChanges = $true | |
$fileName = "TeamCity_Backup_" | |
$username = "USERNAME" # Must be a TeamCity Admin | |
$password = "PASSWORD" |
This file contains hidden or 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
function Execute-BackupArchive | |
{ | |
param | |
( | |
[string] $sourcePath, | |
[string] $destinationPath, | |
[int] $minimumAge | |
) | |
$archiveFilesPath = ($sourcePath + "\to_delete") |
This file contains hidden or 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
function Execute-HTTPPostCommand() { | |
param( | |
[string] $url, | |
[string] $username, | |
[string] $password | |
) | |
$authInfo = $username + ":" + $password | |
$authInfo = [System.Convert]::ToBase64String([System.Text.Encoding]::Default.GetBytes($authInfo)) | |
This file contains hidden or 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
Get-AzureVMImage | ConvertTo-HTML | Out-File C:\temp\AzureVmImages.htm |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<teamcity-plugin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="urn:shemas-jetbrains-com:teamcity-plugin-v1-xml"> | |
<info> | |
<name>NewRelicDeploymentNotifierPlugin</name> | |
<display-name>NewRelic Deployment Notifier</display-name> | |
<version>snapshot</version> | |
<description>Notifies NewRelic that a new deployment has occurred.</description> | |
<vendor> | |
<name>Endjin Limited</name> |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<teamcity-agent-plugin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="urn:shemas-jetbrains-com:teamcity-agent-plugin-v1-xml"> | |
<tool-deployment/> | |
</teamcity-agent-plugin> |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<meta-runner name="NewRelic Deployment Notifier"> | |
<description>Notify NewRelic that a new deployment has occurred</description> | |
<settings> | |
<parameters> | |
<!-- Mandatory Fields --> | |
<param name="teamcity.tool.newrelic.deploymentnotifier.apikey" value="" spec="text description='NewRelic API Key' display='normal' label='API Key' validationMode='not_empty'" /> | |
<param name="teamcity.tool.newrelic.deploymentnotifier.appname" value="" spec="text description='The value of app_name in the newrelic configuration file used by the application. This may be different than the label that appears in the RPM UI. You can find the app_name value in RPM by looking at the label settings for your application.' display='normal' label='App Name' validationMode='not_empty'" /> | |
<!-- Optional Fields --> | |
<param name="teamcity.tool.newrelic.deploymentnotifier.changelog" value="" spec="text description='A list of changes for this deployment' display='normal' label=' |
This file contains hidden or 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
"%teamcity.agent.tools.dir%\nr-deployment-notifier\bin\curl.exe" -silent -k | |
-H "x-api-key:%teamcity.tool.newrelic.deploymentnotifier.apikey%" | |
-d "deployment[app_name]=%teamcity.tool.newrelic.deploymentnotifier.appname%" | |
-d "deployment[changelog]=%teamcity.tool.newrelic.deploymentnotifier.changelog%" | |
-d "deployment[description]=%teamcity.tool.newrelic.deploymentnotifier.description%" | |
-d "deployment[environment]=%teamcity.tool.newrelic.deploymentnotifier.environment%" | |
-d "deployment[revision]=%teamcity.tool.newrelic.deploymentnotifier.revision%" | |
-d "deployment[user]=%teamcity.tool.newrelic.deploymentnotifier.user%" | |
https://api.newrelic.com/deployments.xml |
This file contains hidden or 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
try | |
{ | |
$body = ""; | |
if ([String]::IsNullOrEmpty($apiKey)){ | |
throw "API Key is required" | |
} else { | |
$headers += @{"x-api-key"=($apiKey)}; | |
} |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<config> | |
<add key="repositorypath" value=".\..\Packages\" /> | |
<!-- Lowest/HighestPatch/HighestMinor/Highest --> | |
<add key="dependencyversion" value="Highest" /> | |
</config> | |
<packageRestore> | |
<!-- Allow NuGet to download missing packages --> | |
<add key="enabled" value="True" /> |