mirror of https://github.com/zulip/zulip.git
integrations doc: Move openshift doc to separate file.
This commit is contained in:
parent
484fef059b
commit
5426725c43
|
@ -116,86 +116,7 @@
|
|||
{% include 'zerver/integrations/email.html' %}
|
||||
{% endif %}
|
||||
|
||||
<div id="openshift" class="integration-instructions">
|
||||
|
||||
<p>Ths integration sends a notification every time a deployment is
|
||||
made in an OpenShift instance.</p>
|
||||
|
||||
<p>First, download our <a href="/api">Python
|
||||
bindings and example scripts</a>, and move it to your local copy of
|
||||
the application's repository.</p>
|
||||
|
||||
<p>Then, create a new commit including all the changes made to the
|
||||
repository, and push it to your app.</p>
|
||||
|
||||
<p>After that, connect to the application through SSH. If you don't know
|
||||
how to do this, log in to your OpenShift Online account, go to your
|
||||
application's dashboard, and click "Want to log in to your application?".
|
||||
<br />There you'll find the app's SSH user, address, and further
|
||||
information on SSH, in case you need it.</p>
|
||||
|
||||
<img class="screenshot" src="/static/images/integrations/openshift/002.png" />
|
||||
|
||||
<p>Once you have connected, install the Python bindings by running:</p>
|
||||
|
||||
<div class="codehilite"><pre>
|
||||
<span class="s">$</span> cd ~/app-root/repo/<python_bindings_path>
|
||||
<span class="s">$</span> python setup.py install</pre>
|
||||
</div>
|
||||
|
||||
<p>Where <code><python_bindings_path></code> is the path where you
|
||||
saved the bindings in the first step.</p>
|
||||
|
||||
<p>Next, open <code>integrations/openshift/zulip_openshift_config.py</code>
|
||||
inside the SSH terminal with your favorite editor, and change the
|
||||
following lines to specify the email address and API key for your
|
||||
OpenShift integration:</p>
|
||||
|
||||
|
||||
<div class="codehilite">
|
||||
<pre><span class="n">ZULIP_USER</span> <span class="o">=</span> <span class="s">"openshift-bot@example.com"</span>
|
||||
<span class="n">ZULIP_API_KEY</span> <span class="o">=</span> <span class="s">"0123456789abcdef0123456789abcdef"</span>
|
||||
{% if api_site_required %}<span class="n">ZULIP_SITE</span> <span class="o">=</span> <span class="s">"{{ external_api_uri_subdomain }}"</span>{% endif %}</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>deployment_notice_destination</code> function
|
||||
in <code>zulip_openshift_config.py</code>. By default, deployments
|
||||
triggered by commits pushed to the <code>master</code> and
|
||||
<code>test-post-receive</code> branches will result in a notification
|
||||
to stream <code>deployments</code>.</p>
|
||||
|
||||
<p>Save the file, and symlink
|
||||
<code>$OPENSHIFT_PYTHON_DIR/virtenv/share/zulip/integrations/openshift/post-receive</code>
|
||||
into the <code>~/app-root/repo/.openshift/action_hooks</code>
|
||||
directory.</p>
|
||||
|
||||
<p>Next, create the stream you'd like to use for OpenShift notifications,
|
||||
and subscribe all interested parties to this stream. The integration will
|
||||
use the default stream <code>deployments</code> if no stream is supplied
|
||||
in the hook; you still need to create the stream even if you are using
|
||||
this default.</p>
|
||||
|
||||
<p><b>Congratulations! You're done!</b><br /> Whenever you make
|
||||
a push to the <code>master</code> branch of your application's repository
|
||||
(or whichever branch you configured above), or if you force a deployment,
|
||||
the Zulip OpenShift plugin will send an automated notification that
|
||||
looks like this:</p>
|
||||
|
||||
<img class="screenshot" src="/static/images/integrations/openshift/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 style="font-size:11px; font-style:italic;">
|
||||
Logos are trademarks of their respective owners.
|
||||
None of the integrations on this page are created by,
|
||||
affiliated with, or supported by the companies
|
||||
represented by the logos.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="perforce" class="integration-instructions">
|
||||
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
<p>
|
||||
Ths integration sends a notification every time a deployment is
|
||||
made in an OpenShift instance.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
First, download our
|
||||
<a href="/api">Pythonbindings and example scripts</a>,
|
||||
and move it to your local copy of the application's repository.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Then, create a new commit including all the changes made to the
|
||||
repository, and push it to your app.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
After that, connect to the application through SSH. If you don't know
|
||||
how to do this, log in to your OpenShift Online account, go to your
|
||||
application's dashboard, and click "Want to log in to your application?".
|
||||
<br/>There you'll find the app's SSH user, address, and further
|
||||
information on SSH, in case you need it.
|
||||
</p>
|
||||
|
||||
<img class="screenshot" src="/static/images/integrations/openshift/002.png"/>
|
||||
|
||||
<p>Once you have connected, install the Python bindings by running:</p>
|
||||
|
||||
<div class="codehilite"><pre>
|
||||
<span class="s">$</span> cd ~/app-root/repo/<python_bindings_path>
|
||||
<span class="s">$</span> python setup.py install</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Where <code><python_bindings_path></code> is the path where you
|
||||
saved the bindings in the first step.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Next, open <code>integrations/openshift/zulip_openshift_config.py</code>
|
||||
inside the SSH terminal with your favorite editor, and change the
|
||||
following lines to specify the email address and API key for your
|
||||
OpenShift integration:
|
||||
</p>
|
||||
|
||||
|
||||
<div class="codehilite">
|
||||
<pre><span class="n">ZULIP_USER</span> <span class="o">=</span> <span class="s">"openshift-bot@example.com"</span>
|
||||
<span class="n">ZULIP_API_KEY</span> <span class="o">=</span> <span class="s">"0123456789abcdef0123456789abcdef"</span>
|
||||
{% if api_site_required %}<span class="n">ZULIP_SITE</span> <span class="o">=</span> <span class="s">"{{ external_api_uri_subdomain }}"</span>{% endif %}</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>deployment_notice_destination</code> function
|
||||
in <code>zulip_openshift_config.py</code>. By default, deployments
|
||||
triggered by commits pushed to the <code>master</code> and
|
||||
<code>test-post-receive</code> branches will result in a notification
|
||||
to stream <code>deployments</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Save the file, and symlink
|
||||
<code>$OPENSHIFT_PYTHON_DIR/virtenv/share/zulip/integrations/openshift/post-receive</code>
|
||||
into the <code>~/app-root/repo/.openshift/action_hooks</code>
|
||||
directory.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Next, create the stream you'd like to use for OpenShift notifications,
|
||||
and subscribe all interested parties to this stream. The integration will
|
||||
use the default stream <code>deployments</code> if no stream is supplied
|
||||
in the hook; you still need to create the stream even if you are using
|
||||
this default.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Congratulations! You're done!</b><br/> Whenever you make
|
||||
a push to the <code>master</code> branch of your application's repository
|
||||
(or whichever branch you configured above), or if you force a deployment,
|
||||
the Zulip OpenShift plugin will send an automated notification that
|
||||
looks like this:
|
||||
</p>
|
||||
|
||||
<img class="screenshot" src="/static/images/integrations/openshift/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>
|
|
@ -132,6 +132,7 @@ def check_html_templates(templates, all_dups):
|
|||
'templates/zerver/integrations/jira-plugin.html',
|
||||
'templates/zerver/integrations/mercurial.html',
|
||||
'templates/zerver/integrations/nagios.html',
|
||||
'templates/zerver/integrations/openshift.html',
|
||||
]
|
||||
validate(fn=fn, check_indent=(fn not in bad_files))
|
||||
|
||||
|
@ -192,6 +193,7 @@ def check_html_templates(templates, all_dups):
|
|||
'templates/zerver/integrations/jira-plugin.html',
|
||||
'templates/zerver/integrations/mercurial.html',
|
||||
'templates/zerver/integrations/nagios.html',
|
||||
'templates/zerver/integrations/openshift.html',
|
||||
]
|
||||
# TODO: Clean these files
|
||||
for fn in templates:
|
||||
|
|
|
@ -216,7 +216,12 @@ INTEGRATIONS = {
|
|||
doc='zerver/integrations/mercurial.html'
|
||||
),
|
||||
'nagios': Integration('nagios', 'nagios', doc='zerver/integrations/nagios.html'),
|
||||
'openshift': Integration('openshift', 'openshift', display_name='OpenShift'),
|
||||
'openshift': Integration(
|
||||
'openshift',
|
||||
'openshift',
|
||||
display_name='OpenShift',
|
||||
doc='zerver/integrations/openshift.html'
|
||||
),
|
||||
'perforce': Integration('perforce', 'perforce'),
|
||||
'phabricator': Integration('phabricator', 'phabricator'),
|
||||
'puppet': Integration('puppet', 'puppet'),
|
||||
|
|
Loading…
Reference in New Issue