Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
ember-cli-deploy-hipchat
Advanced tools
An ember-cli-deploy-plugin for sending messages to HipChat
An ember-cli-deploy-plugin for sending deployment messages to HipChat.
A plugin is an addon that can be executed as a part of the ember-cli-deploy pipeline. A plugin will implement one or more of the ember-cli-deploy's pipeline hooks.
For more information on what plugins are and how they work, please refer to the Plugin Documentation.
To get up and running quickly, do the following:
$ ember install ember-cli-deploy-hipchat
Create an authToken in HipChat with the Send Notification
permission.
Create a roomNotifyToken in HipChat. You can generate one by going to HipChat.com > Rooms tab > Click the room you want > Tokens on the left-hand side > generate a new token with the Send Notification
scope.
Identify the Room API ID. You can identify this by going to HipChat.com > Rooms tab > Click the room you want > Summary on the left-hand side > API ID in the table.
Place the following configuration into config/deploy.js
ENV.hipchat = {
authToken: '<your-authToken>',
roomNotifyToken: '<your-roomNotifyToken>',
room: '<your-roomId>'
}
If you use a custom HipChat domain, include it in the configuration.
ENV.hipchat = {
authToken: '<your-authToken>',
roomNotifyToken: '<your-roomNotifyToken>',
room: '<your-roomId>',
endpoint: '<your-custom-endpoint>'
}
$ ember deploy
For detailed information on what plugin hooks are and how they work, please refer to the Plugin Documentation.
configure
willDeploy
willBuild
build
didBuild
willUpload
upload
didUpload
willActivate
activate
didActivate
displayRevisions
didDeploy
didFail
For detailed information on how configuration of plugins works, please refer to the Plugin Documentation.
###authToken
The authToken to use to auth with HipChat.
###roomNotifyToken
A token for the room you want to notify in HipChat.
You can generate one by going to HipChat.com > Rooms tab > Click the room you want > Tokens on the left-hand side > generate a new token with the Send Notification
scope.
###room
The Room API ID. You can identify this by going to HipChat.com > Rooms tab > Click the room you want > Summary on the left-hand side > API ID in the table. You (supposedly) can also use the room name, but the ID is safer.
###endpoint (optional)
If you host your own HipChat server, enter the API V2 endpoint for your setup.
ember-cli-deploy-hipchat
will send default messages on the didDeploy
-,
didActivate
- and didFail
-hooks on the pipeline.
Because every team is different and people tend to customize their automatic
hipchat notifications messages can be customized.
To customize a message you simply add a function to your hipchat configuration options that is named the same as the hook notification you want to customize:
ENV.hipchat = {
authToken: '<your-authToken>',
roomNotifyToken: '<your-roomNotifyToken>',
room: '<your-roomId>',
didDeploy: function(context) {
return function(hipchat) {
return hipchat.notify('w00t I can haz customizations!', 'yellow');
};
}
}
Notification hooks will be passed the deployment context and the hipchatNotifier
utility class. The HipchatNotifier uses hipchatter under the hood so you can use its notify
-function accordingly.
If you would like to send options beyond message and color (message_type
, for example), you can pass options:
didDeploy: function(context) {
return function(hipchat) {
return hipchat.notify({
message: 'what is up @all',
color: 'purple',
message_type: 'text'
});
}
}
Because of the way ember-cli-deploy
merges return values of hooks back into the deployment context, you can easily add custom properties to the deployment context if that's what you need to do:
ENV.hipchat = {
authToken: '<your-authToken>',
roomNotifyToken: '<your-roomNotifyToken>',
room: '<your-roomId>',
didDeploy: function(context) {
return function(hipchat) {
var myCustomLogic = something;
var message = "I deployed with " + myCustomLogic + " extra info!";
return hipchat.notify(message, 'green');
};
}
}
npm test
FAQs
An ember-cli-deploy-plugin for sending messages to HipChat
The npm package ember-cli-deploy-hipchat receives a total of 0 weekly downloads. As such, ember-cli-deploy-hipchat popularity was classified as not popular.
We found that ember-cli-deploy-hipchat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.