Giter VIP home page Giter VIP logo

grunt-raygun-deployment's Introduction

grunt-raygun-deployment

This plugin makes it easy to notify Raygun of your deployments using a grunt task.

Installation

First, install the npm package:

npm install grunt-raygun-deployment --save-dev

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
            // Alternatively, set the RAYGUN_APIKEY and RAYGUN_AUTHTOKEN environment variables
            raygunApiKey: 'YOUR APPLICATIONS API KEY',
            raygunAuthToken: 'YOUR EXTERNAL AUTH TOKEN'
        }
    }
});

grunt.loadNpmTasks('grunt-raygun-deployment');

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. Run RAYGUN_APIKEY="YOUR APPLICATIONS API KEY" RAYGUN_AUTHTOKEN="YOUR EXTERNAL AUTH TOKEN" grunt raygun_deployment and leave the options out of Gruntfile.js.

Finally, create a release file. We default to checking Release.yml, but you can set this path with the release option.

This is an example release file:

version: 6.1.0.0
ownerName: Ronald Raygun
emailAddress: [email protected]
notes: |
    # Testing out the rake plugin

    * More markdown formatting

    ### Ronald

Once you've written this to Releases.yml, run grunt raygun_deployment and your deployment will be sent to Raygun!

If you'd rather set your release information in your Gruntfile.js you can setup 'release' as an object under the grunt settings instead.

// Project configuration.
grunt.initConfig({
  // Configuration to be run (and then tested).
  raygun_deployment: {
    options: {
      // You need to fill this in with your own data
      // Alternatively, set the RAYGUN_APIKEY and RAYGUN_AUTHTOKEN environment variables
      raygunApiKey: 'YOUR APPLICATIONS API KEY',
      raygunAuthToken: 'YOUR EXTERNAL AUTH TOKEN',
      release: {
        version: '6.1.0.0',
        ownerName: 'Ronald Raygun',
        emailAddress: '[email protected]',
        notes: '#Testing out the grunt plugin\n* List item'
      }
    }
  }
});

Changelog

  • 1.1.1 - Add ability to set release info in the Gruntfile.
  • 1.1.0 - Add ability to set AuthToken and API Key as environment variables.
  • 1.0.1 - Initial release.

grunt-raygun-deployment's People

Contributors

arbaaz avatar dwnz avatar jamiepenney avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

grunt-raygun-deployment's Issues

Fork Feedback

First, congrats on launching the Deployments API. It's a great feature and we're excited to start using it.

We were also really happy to see a grunt plugin since we're big users of grunt. After reviewing the docs, a few things stuck out to me so I chose to fork. The changes I've made are pretty substantial. I don't think it makes sense to open a Pull Request, but I hope this general feedback helps others use one or the other to ultimately track deployments in raygun.

The first thing that stuck out to me is the configuring grunt with your application's API key and your personal external auth token. By making these options you define, you're implicitly encouraging developers to commit those keys and tokens into version control which is a bad practice. Please correct me if I'm misguided about the sensitivity of the key or token.

The second thing that didn't jive with how we continuously release is the Release.yml. There's nothing wrong with this approach. It's nice that markdown is supported. We'd rather rely on git tags that link back to releases in GitHub which are most likely a merged Pull Request. I image both plugins will evolve to allow more customizations around this part.

Lastly, I wanted to have some tests. Grunt plugins are hard to unit tests because of their dependence on grunt and most plugins just rely on it running and checking the output. If and when this plugin evolves, I wanted to have more assurance everything should work as expected.

Hope this feedback is helpful. I wanted to contribute what I thought made sense upstream. Keep putting out APIs for us to hack on :neckbeard:

Javascript Error on deployments panel

screen shot 2015-05-11 at 8 33 33 pm

I was testing deployments tracking for my project using your grunt task, and it completed without any error. But on my deployments list panel on raygun dashboard, i get a blank view. i have attached the snapshot of my browser console

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.