mirror of https://github.com/zulip/zulip.git
437 lines
21 KiB
HTML
437 lines
21 KiB
HTML
{% extends "zephyr/portico.html" %}
|
|
|
|
{# API information page #}
|
|
|
|
{% block portico_content %}
|
|
<div class="row-fluid">
|
|
<div class="span8">
|
|
<h2>Integrations</h2>
|
|
|
|
<p>The English poet John Donne once wrote that "no man is an
|
|
island", and we feel the same about software. No system exists in
|
|
complete isolation, so we've made it easy for Humbug to connect to
|
|
the services you already use.</p>
|
|
|
|
<p>With the integrations below, your team can stay up-to-date on
|
|
code changes, issue tickets, build system results, and much
|
|
more. So ask not for whom the notification tolls—it tolls
|
|
for thee! (Or for a team member of yours, I guess.)</p>
|
|
|
|
<h3>Getting started</h3>
|
|
<p>Many of these integrations are available in
|
|
our <a href="/api">API download</a>. They also require a
|
|
registered Humbug user to send as. You can use your existing
|
|
account, or
|
|
<a href="{% url 'zephyr.views.accounts_home' %}">register</a> a new
|
|
one for them. (If new email addresses are hard to come by, you can
|
|
use something like <code>wdaher+github@example.com</code>.)</p>
|
|
|
|
<h3 id="services">Services with integrations</h3>
|
|
<ul>
|
|
<li><a href="#beanstalk">Beanstalk</a></li>
|
|
<li><a href="#capistrano">Capistrano</a></li>
|
|
<li><a href="#git">Git</a></li>
|
|
<li><a href="#github">GitHub</a></li>
|
|
<li><a href="#jenkins">Jenkins (or Hudson)</a></li>
|
|
<li><a href="#jira">Jira (hosted or v5.2+)</a></li>
|
|
<li><a href="#jira-plugin">Jira (locally installed)</a></li>
|
|
<li><a href="#nagios">Nagios</a></li>
|
|
{% comment %}
|
|
<li><a href="#pivotal">Pivotal Tracker</a></li>
|
|
<li><a href="#svn">Subversion</a></li>
|
|
{% endcomment %}
|
|
<li><a href="#trac">Trac</a></li>
|
|
{% comment %}
|
|
<li><a href="#trello">Trello</a></li>
|
|
<li><a href="#twitter">Twitter</a></li>
|
|
{% endcomment %}
|
|
<li>...and more coming soon! <a href="mailto:support@humbughq.com?subject=Integration+request">Email us</a> with requests!</li>
|
|
</ul>
|
|
{#--------------------------------------------------------------------#}
|
|
<div id="beanstalk" class="integration">
|
|
<h4>Beanstalk</h4>
|
|
<p>Humbug supports both SVN and Git notifications from Beanstalk. In the beanstalk web application, go to the Setup page, and choose the Integrations tab.
|
|
Choose the <code>Webhooks</code> integration from the list presented. Make sure to replace the <code>@</code> in your email address with <code>%40</code>,
|
|
as Beanstalk's website will incorrectly refuse to parse a username containing a <code>@</code>.</p>
|
|
|
|
<p>In the URL field, enter <code>https://email:api_key@humbughq.com/api/v1/external/beanstalk</code>:</p>
|
|
<img class="screenshot" src="/static/images/integrations/beanstalk/001.png">
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> Whenever you do a
|
|
deployment, you'll get an automated notification that looks like
|
|
this:</p>
|
|
<img class="screenshot" src="/static/images/integrations/beanstalk/002.png">
|
|
<p>
|
|
<a href="#services">^ Back to top</a>
|
|
</p>
|
|
</div>
|
|
{#--------------------------------------------------------------------#}
|
|
<div id="capistrano" class="integration">
|
|
<h4>Capistrano</h4>
|
|
<p>First, download and install our <a href="/api">Python
|
|
bindings and example scripts</a> on your Capistrano server.
|
|
Once you've done that, you'll use the <code>humbug-send</code>
|
|
utility to notify you when certain events happen.</p>
|
|
|
|
<p>Here's some example code for sending a Humbug notification
|
|
after a deployment has completed:</p>
|
|
<div class="codehilite"><pre><span class="n">after</span> <span class="s1">'deploy'</span><span class="p">,</span> <span class="s1">'notify:humbug'</span>
|
|
|
|
<span class="n">namespace</span> <span class="ss">:notify</span> <span class="k">do</span>
|
|
<span class="n">desc</span> <span class="s2">"Post a message to Humbug that we've deployed"</span>
|
|
<span class="n">task</span> <span class="ss">:humbug</span> <span class="k">do</span>
|
|
<span class="c1"># this will post to Humbug as the user defined in ~/.humbugrc</span>
|
|
<span class="n">run_locally</span> <span class="s2">"echo ':beers: I just deployed to </span><span class="si">#{</span><span class="n">stage</span><span class="si">}</span><span class="s2">! :beers:' | humbug-send --stream commits --subject deployments || true"</span>
|
|
<span class="k">end</span>
|
|
<span class="k">end</span>
|
|
</pre></div>
|
|
|
|
<p>Some notes:</p>
|
|
<ul>
|
|
<li>Make sure you've created a
|
|
filled-out <code>~/.humbugrc</code> on your Capistrano
|
|
machine.</li>
|
|
<li>You may need to change the <code>deploy</code> above to
|
|
another step of your deployment process, if you'd like the
|
|
notification to fire at a different time.</li>
|
|
</ul>
|
|
<em></em></p>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> Whenever you do a
|
|
deployment, you'll get an automated notification that looks like
|
|
this:</p>
|
|
<img class="screenshot" src="/static/images/integrations/capistrano/001.png">
|
|
|
|
<p><small>Thanks to Wes of TurboVote for <a href="https://gist.github.com/cap10morgan/5100822">submitting this integration</a>!</small></p>
|
|
<p>
|
|
<a href="#services">^ Back to top</a>
|
|
</p>
|
|
</div>
|
|
{#--------------------------------------------------------------------#}
|
|
<div id="git" class="integration">
|
|
<h4>Git</h4>
|
|
<p>First, download and install our <a href="/api">Python
|
|
bindings and example scripts</a> on your Git server.</p>
|
|
|
|
<p>Next, open <code>integrations/git/humbug_git_config.py</code>
|
|
in your favorite editor, and change the following lines to
|
|
specify the email address and API key for your Git bot:</p>
|
|
|
|
|
|
<div class="codehilite"><pre><span class="n">HUMBUG_USER</span> <span class="o">=</span> <span class="s">"git@example.com"</span>
|
|
<span class="n">HUMBUG_API_KEY</span> <span class="o">=</span> <span class="s">"0123456789abcdef0123456789abcdef"</span></pre></div>
|
|
|
|
<p>You can also specify which pushes will result in
|
|
notifications and to what stream the notifications will be sent
|
|
by modifying the <code>commit_notice_destination</code> function
|
|
in <code>humbug_git_config.py</code>. By default, pushes to
|
|
the <code>master</code> and <code>test-post-receive</code>
|
|
branches will result in a notification to
|
|
stream <code>commits</code>.</p>
|
|
|
|
<p>Save <code>integrations/git/humbug_git_config.py</code> to
|
|
the <code>.git/hooks</code> directory of your git
|
|
repository.</p>
|
|
|
|
<p>Symlink
|
|
<code>/usr/local/share/humbug/integrations/git/post-receive</code>
|
|
into the <code>.git/hooks</code> directory of your git repository.</p>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> Whenever you make
|
|
a push to the <code>master</code> branch of your git repository
|
|
(or whatever you configured above), the Humbug git plugin will
|
|
send an automated notification that looks like this:</p>
|
|
<img class="screenshot" src="/static/images/integrations/git/001.png">
|
|
|
|
<p><b>Testing</b><br />You can test the plugin without changing
|
|
your <code>master</code> branch by pushing to
|
|
the <code>test-post-receive</code> branch.</p>
|
|
|
|
<p>
|
|
<a href="#services">^ Back to top</a>
|
|
</p>
|
|
</div>
|
|
{#--------------------------------------------------------------------#}
|
|
<div id="github" class="integration">
|
|
<h4>GitHub</h4>
|
|
<p>First, go to your repository page and click "Settings":</p>
|
|
<img src="/static/images/integrations/github/001.png">
|
|
|
|
<p>From there, select "Service Hooks":</p>
|
|
<img src="/static/images/integrations/github/002.png">
|
|
|
|
<p>Select "Humbug" from the list, fill in the API key and email
|
|
address for your bot, check the "active" checkbox, and pick
|
|
"Update settings":</p>
|
|
<img src="/static/images/integrations/github/003.png">
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When people push
|
|
to your repository, you'll see a commit message like the
|
|
following, to the stream <code>commits</code> with a subject that matches the repository name (in this case "humbug-test"):</p>
|
|
<img class="screenshot" src="/static/images/integrations/github/004.png">
|
|
|
|
<p>
|
|
<a href="#services">^ Back to top</a>
|
|
</p>
|
|
</div>
|
|
{#--------------------------------------------------------------------#}
|
|
<div id="jenkins" class="integration">
|
|
<h4>Jenkins (or Hudson)</h4>
|
|
|
|
<p>Install the "Humbug" plugin by going to <code>Manage Jenkins
|
|
> Manage Plugins > Available</code>, typing in "Humbug", and
|
|
clicking "Install without restart".</p>
|
|
|
|
<img src="/static/images/integrations/jenkins/001.png">
|
|
|
|
<p>Once the plugin is installed, configure it by going
|
|
to <code>Manage Jenkins > Configure System</code>.</p>
|
|
|
|
<img src="/static/images/integrations/jenkins/002.png">
|
|
|
|
<p>Scroll to the section labeled "Humbug Notification Settings",
|
|
and specify your bot's email address, API key, and where you'd
|
|
like your notification messages to go (we recommend the
|
|
stream <code>jenkins</code>).</p>
|
|
|
|
<p>The other two options you might want to adjust are "Smart
|
|
Notification" (do you want a message after every single build,
|
|
or only after a status change?), and "Jenkins URL"—the URL to
|
|
your instance of Jenkins, so that we can link you to specific
|
|
build reports.</p>
|
|
|
|
<img src="/static/images/integrations/jenkins/003.png">
|
|
|
|
<p>Once you've done that, it's time to configure one of your
|
|
projects to use the Humbug notification plugin. From your
|
|
project page, click "Configure" on the left sidebar:</p>
|
|
|
|
<img src="/static/images/integrations/jenkins/004.png">
|
|
|
|
<p>Then, scroll to the bottom until you find the section labeled
|
|
"Post-build Actions". Click the dropdown and select "Humbug
|
|
Notification". It should look as below. Then click "Save".</p>
|
|
|
|
<img src="/static/images/integrations/jenkins/005.png">
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When your builds
|
|
fail or succeed, you'll see a commit message like the following
|
|
with a subject that matches the project name (in this case
|
|
"Humbug Test"):</p>
|
|
<img class="screenshot" src="/static/images/integrations/jenkins/006.png">
|
|
<img class="screenshot" src="/static/images/integrations/jenkins/007.png">
|
|
|
|
<p><b>Troubleshooting</b></p>
|
|
<p>If you don't see the Humbug option in the list, confirm that
|
|
the plugin was successfully installed by going to <code>Manage
|
|
Jenkins > Manage Plugins > Installed</code> and confirming that
|
|
"Humbug Plugin" appears in the list. If it does not, the
|
|
plugin was not successfully installed. Make sure that you have
|
|
the <a href="https://wiki.jenkins-ci.org/display/JENKINS/Maven+2+Project+Plugin">Maven
|
|
plugin</a> installed and try again, or
|
|
email <a href="mailto:support@humbughq.com">support@humbughq.com</a>
|
|
for help.</p>
|
|
|
|
<p>
|
|
<a href="#services">^ Back to top</a>
|
|
</p>
|
|
</div>
|
|
{#--------------------------------------------------------------------#}
|
|
<div id="jira" class="integration">
|
|
<h4>JIRA</h4>
|
|
<h5>Webhook mechanism</h5>
|
|
If you are running JIRA version 5.2 or greater, or are using the hosted JIRA provided
|
|
by Atlassian, you can use the built in web-hook support to connect to Humbug. If you are not
|
|
using the Atlassian-hosted JIRA, you may also use the <a href="#jira-plugin">Jira Plugin</a>
|
|
mechanism that supports older versions of JIRA.
|
|
<p>In your JIRA administration control panel, go to the Webhooks page. If you are using the OnDemand
|
|
hosted JIRA, follow the instructions <a href="https://developer.atlassian.com/display/JIRADEV/JIRA+Webhooks+Overview#JIRAWebhooksOverview-WhereistheJIRAAdministrationUIforwebhooks?">
|
|
on the Atlassian wiki</a> for locating the Webhook UI</a>.
|
|
</p>
|
|
<p>Give your new web hook a name, and for the URL provide <code>https://humbughq.com/api/v1/external/jira/API_KEY</code>
|
|
where <code>API_KEY</code> is the api key of the user you wish to post JIRA updates as.
|
|
</p>
|
|
|
|
<p><b>Congratulations! You're done!</b><br />
|
|
Updates from JIRA will be sent to the <code>jira</code> stream, and it must already exist.</p>
|
|
<img class="screenshot" src="/static/images/integrations/jira/001.png">
|
|
<p>
|
|
<a href="#services">^ Back to top</a>
|
|
</p>
|
|
</div>
|
|
{#--------------------------------------------------------------------#}
|
|
<div id="jira-plugin" class="integration">
|
|
<h4>JIRA</h4>
|
|
<h5>Plugin mechanism</h5>
|
|
First, download and install our <a href="/api">Python bindings and example scripts</a>.
|
|
<p><b>Plugin Installation</b></p>
|
|
The JIRA integration plugin requires two JIRA plugins. Please install
|
|
the following plugins using the Universal Plugin Manager in your JIRA
|
|
installation:
|
|
<ul>
|
|
<li><a href="https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner">Script Runner Plugin</a></li>
|
|
<li><a href="https://marketplace.atlassian.com/plugins/com.atlassian.jira.plugin.jirasslplugin">SSL Plugin</a></li>
|
|
</ul>
|
|
<p><b>SSL Setup</b></p>
|
|
As Humbug is using a StartCOM SSL certificate that is not recognized by default in the Java installation shipped with JIRA,
|
|
you will need to tell JIRA about the certificate. Navigate to <code>Administration > System > Configure SSL</code> and in
|
|
the <code>Import SSL Certificates</code> field, enter <code>https://www.humbughq.com</code>. After clicking <code>Save Certificates</code>,
|
|
follow the on-screen instructions and restart JIRA for it to recognize the proper certificates.
|
|
<p><b>Humbug Integration</b></p>
|
|
Copy the folder <code>integrations/jira/org/</code> (from the tarball you downloaded above) to your JIRA <code>classes</code> folder.
|
|
For self-contained JIRA installations, this will be <code>atlassian-jira/WEB-INF/classes/</code>, but this may be different in your deployment.</p>
|
|
Edit the constants at the top of <code>org/humbug/jira/HumbugListener.groovy</code>
|
|
and fill them with the appropriate values:
|
|
<div class="codehilite"><pre><span class="n">String</span> <span class="n">humbugEmail</span> <span class="o">=</span> <span class="s2">"jira-notifications@example.com"</span>
|
|
<span class="n">String</span> <span class="n">humbugAPIKey</span> <span class="o">=</span> <span class="s2">"0123456789abcdef0123456789abcdef"</span>
|
|
<span class="n">String</span> <span class="n">humbugStream</span> <span class="o">=</span> <span class="s2">"JIRA"</span>
|
|
<span class="n">String</span> <span class="n">issueBaseUrl</span> <span class="o">=</span> <span class="s2">"https://jira.COMPANY.com/browse/"</span>
|
|
</pre></div></p>
|
|
<p>In the Administrators page, navigate to <code>Plugins > Other > Script Listeners</code>. In the <code>Add Listener</code> section, click on
|
|
the <code>Custom Listener</code> option. Select the events you wish the Humbug integration to fire for, and the projects you wish Humbug to be notified for.
|
|
In the <code>Name of groovy class</code> field, enter <code>org.humbug.jira.HumbugListener</code>.
|
|
|
|
<p>Click <code>Add Listener</code>, and JIRA will now notify your Humbug of changes to your issues!</p>
|
|
|
|
<p><b>Congratulations! You're done!</b><br />
|
|
Updates from JIRA will be sent to the stream you've configured, as below.</p>
|
|
<img class="screenshot" src="/static/images/integrations/jira/001.png">
|
|
<p>
|
|
<a href="#services">^ Back to top</a>
|
|
</p>
|
|
</div>
|
|
{#--------------------------------------------------------------------#}
|
|
<div id="nagios" class="integration">
|
|
<h4>Nagios</h4>
|
|
<p>First, download and install our <a href="/api">Python
|
|
bindings and example scripts</a> on your Nagios server.</p>
|
|
|
|
<p>Next, open <code>integrations/nagios/humbugrc.example</code>
|
|
in your favorite editor, and change the following lines to
|
|
specify the email address and API key for your Nagios bot,
|
|
saving it to <code>/etc/nagios3/humbugrc</code> on your Nagios
|
|
server:</p>
|
|
|
|
<div class="codehilite"><pre>[api]
|
|
email=NAGIOS_EMAIL_ADDRESS
|
|
key=NAGIOS_API_KEY
|
|
</pre></div>
|
|
|
|
<p>Copy <code>integrations/nagios/humbug_nagios.cfg</code>
|
|
to <code>/etc/nagios3/conf.d</code> on your Nagios server.</p>
|
|
|
|
<p>Finally, add <code>humbug</code> to the <code>members</code>
|
|
list for one or more of the contact groups in the <code>CONTACT
|
|
GROUPS</code> section
|
|
of <code>/etc/nagios3/conf.d/contacts.cfg</code>, doing
|
|
something like:
|
|
|
|
<div class="codehilite"><pre>define contactgroup{
|
|
contactgroup_name admins
|
|
alias Nagios Administrators
|
|
members monitoring<span class="na">, humbug</span>
|
|
}
|
|
</pre></div>
|
|
|
|
Once you've done that, reload your Nagios configuration
|
|
using <code>/etc/init.d/nagios3 reload</code>.</p>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When your Nagios
|
|
system makes an alert, you'll see a message like the following,
|
|
to the stream <code>nagios</code> (to change this, edit the
|
|
arguments to <code>nagios-notify-humbug</code>
|
|
in <code>/etc/nagios3/conf.d/humbug_nagios.cfg</code>) with a
|
|
subject indicating the service with an issue:</p>
|
|
<img class="screenshot" src="/static/images/integrations/nagios/001.png">
|
|
|
|
<p><b>Testing</b><br />If you
|
|
have <a href="http://nagios.sourceforge.net/docs/3_0/extcommands.html">external
|
|
commands enabled in Nagios</a>, you can generate a test notice
|
|
from your Nagios instance by visiting using the <code>Send
|
|
custom service notification</code> command in
|
|
the <code>Service Commands</code> section of any individual
|
|
service's page on your Nagios instance.</p>
|
|
|
|
<p><b>Troubleshooting</b><br />You can confirm whether you've
|
|
correctly configured Nagios to run the Humbug plugin by looking
|
|
for <code>SERVICE NOTIFICATION</code> lines mentioning humbug
|
|
in <code>/var/log/nagios3/nagios.log</code>. You can confirm
|
|
whether you've configured the Humbug plugin code correctly by
|
|
running <code>/usr/local/share/humbug/integrations/nagios/nagios-notify-humbug</code>
|
|
directly.</p>
|
|
|
|
<p>
|
|
<a href="#services">^ Back to top</a>
|
|
</p>
|
|
</div>
|
|
|
|
{#--------------------------------------------------------------------#}
|
|
<div id="trac" class="integration">
|
|
<h4>Trac</h4>
|
|
<p>First, download and install our <a href="/api">Python
|
|
bindings and example scripts</a> on your Trac server.</p>
|
|
|
|
<p>Next, open <code>integrations/trac/humbug_trac_config.py</code> in
|
|
your favorite editor, and change the following lines to specify
|
|
your bot's email address, API key, and where you'd like your
|
|
notification messages to go (by default,
|
|
stream <code>trac</code>):</p>
|
|
|
|
<div class="codehilite"><pre><span class="n">HUMBUG_USER</span> <span class="o">=</span> <span class="s">"trac-notifications@example.com"</span>
|
|
<span class="n">HUMBUG_API_KEY</span> <span class="o">=</span> <span class="s">"0123456789abcdef0123456789abcdef"</span>
|
|
<span class="n">STREAM_FOR_NOTIFICATIONS</span> <span class="o">=</span> <span class="s">"trac"</span>
|
|
<span class="n">TRAC_BASE_TICKET_URL</span> <span class="o">=</span> <span class="s">"https://trac.example.com/ticket"</span></pre></div>
|
|
|
|
<p>Copy <code>integrations/trac/humbug_trac.py</code>
|
|
and <code>integrations/trac/humbug_trac_config.py</code> into
|
|
your Trac installation's <code>plugins/</code>
|
|
subdirectory. Once you've done that, edit your Trac
|
|
installation's <code>conf/trac.ini</code> to
|
|
add <code>humbug_trac</code> to the <code>[components]</code>
|
|
section, as follows:</p>
|
|
|
|
<div class="codehilite"><pre><span class="k">[components]</span>
|
|
<span class="na">humbug_trac</span> <span class="o">=</span> <span class="s">enabled</span></pre></div>
|
|
|
|
<p>You may then need to restart Trac (or Apache) so that Trac will load our plugin.</p>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When people open
|
|
new tickets (or edit existing tickets), you'll see a message
|
|
like the following, to the stream <code>trac</code> (or whatever
|
|
you configured above) with a subject that matches the ticket
|
|
name:</p>
|
|
<img class="screenshot" src="/static/images/integrations/trac/001.png">
|
|
|
|
<p><b>Additional trac configuration</b><br /> After using the plugin
|
|
for a while, you may want to customize which changes to tickets
|
|
result in a Humbug notification using
|
|
the <code>TRAC_NOTIFY_FIELDS</code> setting
|
|
in <code>humbug_trac_config.py</code>.</p>
|
|
|
|
<p>
|
|
<a href="#services">^ Back to top</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
{% block customhead %}
|
|
{{ block.super }}
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
$("a.title").addClass("show-integral");
|
|
$("a.title").prepend($("<span class='integral'>∫</span>"));
|
|
$("a.title").hover(function (e) {
|
|
$(".integral").css("display", "inline");
|
|
var width = $(".integral").width();
|
|
$("a.title").css("left", -1 * width);
|
|
},
|
|
function (e) {
|
|
$(".integral").css("display", "none");
|
|
$("a.title").css("left", 0);
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|