mirror of https://github.com/zulip/zulip.git
Documentation for the Perforce integration
(imported from commit 0b2eaed618a226d64dcff395467607f4f7d01579)
This commit is contained in:
parent
479e3bfbd0
commit
54d9a733c2
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
|
@ -130,6 +130,12 @@
|
|||
<span class="integration-label">New Relic</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="integration-lozenge integration-perforce">
|
||||
<a class="integration-link integration-perforce" href="#perforce">
|
||||
<img class="integration-logo" src="/static/images/integrations/logos/perforce.png">
|
||||
<span class="integration-label">Perforce</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="integration-lozenge integration-phabricator">
|
||||
<a class="integration-link integration-phabricator" href="#phabricator">
|
||||
<img class="integration-logo" src="/static/images/integrations/logos/phabricator.png">
|
||||
|
@ -1024,6 +1030,53 @@ key = NAGIOS_BOT_API_KEY
|
|||
directly.</p>
|
||||
</div>
|
||||
|
||||
<div id="perforce" class="integration-instructions">
|
||||
|
||||
|
||||
<p>Zulip supports integration with Perforce as a
|
||||
<a href="http://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.scripting.html">trigger</a>
|
||||
that fires once a changelist is submitted and committed. To do this:</p>
|
||||
|
||||
<ol>
|
||||
<li>Download and install our <a href="/api">Python bindings</a> on the
|
||||
server that hosts your Perforce depot. The Perforce trigger will be
|
||||
installed to a location like
|
||||
<code>/usr/local/share/zulip/integrations/perforce</code></li>
|
||||
|
||||
<li>Open <code>integrations/perforce/zulip_perforce_config.py</code> in
|
||||
your favorite editor and change the <code>ZULIP_USER</code> and
|
||||
<code>ZULIP_API_KEY</code> variables at the top of the file to the
|
||||
credentials for the bot you'd like to use for this integration.</li>
|
||||
|
||||
<li>Edit your
|
||||
<a href="http://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.scripting.html#d0e14583">trigger table</a>
|
||||
with <code>p4 triggers</code> and add an entry something like the
|
||||
following:
|
||||
|
||||
<pre>notify_zulip change-commit //depot/... "python /usr/local/share/zulip/integrations/perforce/zulip_change-commit.py %change% %changeroot%"</pre>
|
||||
</li>
|
||||
|
||||
<li>By default, this hook will send to streams of the form
|
||||
<code>depot_subdirectory-commits</code>. So, a changelist that modifies
|
||||
files in <code>//depot/foo/bar/baz</code> will result in a message to
|
||||
stream <code>foo-commits</code>. Messages about changelists that modify
|
||||
files in the depot root or files in multiple direct subdirectories of
|
||||
the depot root will be sent to <code>depot-commits</code>. If you'd
|
||||
prefer different behavior, such as all commits across your depot going
|
||||
to one stream, change it now in <code>zulip_perforce_config.py</code>.
|
||||
Make sure that everyone interested in getting these post-commit Zulips
|
||||
is subscribed to the relevant streams!</li>
|
||||
</ol>
|
||||
|
||||
<p><b>Congratulations! You're done!</b><br /> When you commit to your
|
||||
Perforce depot the team can see updates in real time in
|
||||
Zulip:</p>
|
||||
|
||||
<img class="screenshot" src="/static/images/integrations/perforce/001.png">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="phabricator" class="integration-instructions">
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue