Grunt
note: This guide is now considered legacy and use of the new API is recommended. A high level guide to migrate to the new API can be found here.
Get an Auth Token
Generate an External Auth Token to use from your Raygun User Settings page
Install
First, install the npm package:
npm install grunt-raygun-deployment --save-dev
Update code
Then, add the following to Gruntfile.js
:
grunt.initConfig({
// Configuration to be run (and then tested).
raygun_deployment: {
options: {
// You need to fill this in with your own data
raygunApiKey: 'YOUR APPLICATIONS API KEY',
raygunAuthToken: 'YOUR EXTERNAL AUTH TOKEN'
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
You'll need the Raygun API Key for your application, plus an External Auth Token which you can generate here.
If you don't want to check your ApiKey or AuthToken into source control, you can pass them to grunt as environment variables instead like this:
RAYGUN_APIKEY="YOUR APPLICATIONS API KEY" RAYGUN_AUTHTOKEN="YOUR EXTERNAL AUTH TOKEN" grunt raygun_deployment
Deployment
Finally, create a release file. We default to checking Release.yml
, but you can set this path with therelease
option.
This is an example release file:
version: 6.0.0.0
ownerName: Jamie Penney
emailAddress: jamie@example.com
notes: |
# Testing out the rake plugin
* More markdown formatting
### Jamie
Once you've written this to Releases.yml
, run grunt raygun_deployment
and your deployment will be sent to Raygun!