Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save HowardvanRooijen/1279e3ed3afac9a9a1f3 to your computer and use it in GitHub Desktop.
Save HowardvanRooijen/1279e3ed3afac9a9a1f3 to your computer and use it in GitHub Desktop.
TeamCity MetaRunner descriptor file
<?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='Changelog' validationMode=''" />
<param name="teamcity.tool.newrelic.deploymentnotifier.description" value="" spec="text description=' Text annotation for the deployment; notes for you' display='normal' label='Description' validationMode=''" />
<param name="teamcity.tool.newrelic.deploymentnotifier.environment" value="" spec="text description='The environment for this deployment' display='normal' label='Environment' validationMode=''" />
<param name="teamcity.tool.newrelic.deploymentnotifier.revision" value="" spec="text description='A revision number (e.g. git commit SHA or build number)' display='normal' label='Revision' validationMode=''" />
<param name="teamcity.tool.newrelic.deploymentnotifier.user" value="" spec="text description='The name of the user/process that triggered this deployment' display='normal' label='User' validationMode=''" />
</parameters>
<build-runners>
<runner name="" type="simpleRunner">
<parameters>
<param name="script.content" value="&quot;%teamcity.agent.tools.dir%\nr-deployment-notifier\bin\curl.exe&quot; -silent -k -H &quot;x-api-key:%teamcity.tool.newrelic.deploymentnotifier.apikey%&quot; -d &quot;deployment[app_name]=%teamcity.tool.newrelic.deploymentnotifier.appname%&quot; -d &quot;deployment[changelog]=%teamcity.tool.newrelic.deploymentnotifier.changelog%&quot; -d &quot;deployment[description]=%teamcity.tool.newrelic.deploymentnotifier.description%&quot; -d &quot;deployment[environment]=%teamcity.tool.newrelic.deploymentnotifier.environment%&quot; -d &quot;deployment[revision]=%teamcity.tool.newrelic.deploymentnotifier.revision%&quot; -d &quot;deployment[user]=%teamcity.tool.newrelic.deploymentnotifier.user%&quot; https://api.newrelic.com/deployments.xml" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
</runner>
</build-runners>
<requirements />
</settings>
</meta-runner>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment