1.0.0 • Published 8 years ago
grunt-bugsnag v1.0.0
grunt-bugsnag
Grunt tasks for common Bugsnag actions.
Installation
npm install --save-dev grunt-bugsnagTasks
bugsnagReportBuild
Reports your application's build to Bugsnag. It can auto detect source control from .git, .hg and package.json.
Config
apiKey: stringyour Bugsnag API key requiredappVersion: stringthe version of the application you are building requiredreleaseStage: string'production','staging'etc. (leave blank if this build can be released to differentreleaseStages)sourceControl: objectan object describing the source control of the build (if not specified, the module will attempt to detect source control information from.git,.hgand the nearestpackage.json)provider: stringcan be one of:'github','github-enterprise','gitlab','gitlab-onpremise','bitbucket','bitbucket-server'repository: stringa URL (git/ssh/https) pointing to the repository, or webpage representing the repositoryrevision: stringthe unique identifier for the commit (e.g. git SHA)
builderName: stringthe name of the person/machine that created this build (defaults to the result of thewhoamicommand)autoAssignRelease: booleanautomatically associate this build with any new error events and sessions that are received for thereleaseStageuntil a subsequent build notification is received. If this is set totrueand noreleaseStageis provided the build will be applied to'production'.
Options
path: stringthe path to search for source control info, defaults toprocess.cwd()endpoint: stringpost the build payload to a URL other than the default (https://build.bugsnag.com)
Usage
/* Gruntfile.js */
module.exports = grunt => {
// See full configuration options above
grunt.initConfig({
bugsnagReportBuild: {
apiKey: 'YOUR_API_KEY',
appVersion: '1.2.3',
options: {}
}
})
// load the task(s) from this module
grunt.loadNpmTasks('grunt-bugsnag')
// add as the last task in your application's build task
grunt.task('build', /* build tasks */, 'bugsnagReportBuild')
}
// $ grunt build
// runs your build process and then notifies Bugsnag if all the previous tasks succeedSupport
- Search open and closed issues issues for similar problems
- Report a bug or request a feature
- Email support@bugsnag.com
Contributing
All contributors are welcome! See our contributing guide.
License
This module is free software released under the MIT License. See LICENSE.txt for details.