2017-06-22 13:32:18 +02:00
|
|
|
{!create-stream.md!}
|
|
|
|
|
2018-11-16 11:38:10 +01:00
|
|
|
{!create-a-bot.md!}
|
|
|
|
|
2017-06-22 13:32:18 +02:00
|
|
|
### Install the plugin
|
|
|
|
|
|
|
|
Install the "Zulip" plugin by going to
|
|
|
|
**Manage Jenkins > Manage Plugins > Available**,
|
|
|
|
typing in **Zulip**, and clicking **Install without
|
2019-02-07 09:49:00 +01:00
|
|
|
restart**.
|
2017-06-22 13:32:18 +02:00
|
|
|
|
|
|
|
![](/static/images/integrations/jenkins/001.png)
|
|
|
|
|
|
|
|
### Configure the plugin
|
|
|
|
|
|
|
|
Once the plugin is installed, configure it by going to
|
|
|
|
**Manage Jenkins > Configure System**. Scroll to the section
|
|
|
|
labeled **Zulip Notification Settings**, and specify your
|
2018-11-16 11:38:10 +01:00
|
|
|
Zulip server address, bot's email address and API key.
|
|
|
|
Optionally, you may configure a default stream or topic. You can also enable
|
|
|
|
smart notifications (i.e. only receive notifications when a build fails or
|
|
|
|
recovers from a failed state).
|
2017-06-22 13:32:18 +02:00
|
|
|
|
|
|
|
(If you don't see this option, you may first need to restart
|
|
|
|
Jenkins.)
|
|
|
|
|
|
|
|
![](/static/images/integrations/jenkins/002.png)
|
|
|
|
|
|
|
|
### Configure a post-build action for your project
|
|
|
|
|
|
|
|
Once you've done that, it's time to configure one of your
|
2018-11-16 11:38:10 +01:00
|
|
|
freestyle projects to use the Zulip notification plugin. On your
|
|
|
|
Jenkins project page, click **Configure** on the left sidebar. Scroll to
|
2017-06-22 13:32:18 +02:00
|
|
|
the bottom until you find the section labeled **Post-build
|
|
|
|
Actions**. Click the dropdown and select **Zulip Notification**.
|
2018-11-16 11:38:10 +01:00
|
|
|
It should look as shown below. If you'd rather not use the defaults from
|
|
|
|
the global configuration, you can set a custom stream and topic.
|
|
|
|
If you don't specify a custom topic, the project name will be used as the
|
|
|
|
topic instead.
|
|
|
|
Then click **Save**.
|
2017-06-22 13:32:18 +02:00
|
|
|
|
|
|
|
![](/static/images/integrations/jenkins/003.png)
|
|
|
|
|
2018-11-16 11:38:10 +01:00
|
|
|
When your builds fail or succeed, you'll see a message as shown below.
|
2017-06-22 13:32:18 +02:00
|
|
|
|
|
|
|
{!congrats.md!}
|
|
|
|
|
|
|
|
![](/static/images/integrations/jenkins/004.png)
|
|
|
|
|
2018-11-16 11:38:10 +01:00
|
|
|
### Advanced use cases
|
|
|
|
|
|
|
|
Besides the **Zulip Notification** post-build action, this plugin
|
|
|
|
also supports the **Zulip Send** action.
|
2019-02-07 09:49:00 +01:00
|
|
|
To learn more, see the [plugin's README](https://github.com/jenkinsci/zulip-plugin).
|
2018-11-16 11:38:10 +01:00
|
|
|
|
2017-06-22 13:32:18 +02:00
|
|
|
### Troubleshooting
|
|
|
|
|
|
|
|
1. Did you set up a post-build action for your project?
|
|
|
|
|
2018-11-16 11:38:10 +01:00
|
|
|
1. Does the stream you picked (e.g. `jenkins`) already exist?
|
|
|
|
If not, create the stream and make sure you're subscribed to it.
|
2017-06-22 13:32:18 +02:00
|
|
|
|
2018-11-16 11:38:10 +01:00
|
|
|
1. Are your API key and email address correct? Test them
|
2017-06-22 13:32:18 +02:00
|
|
|
using [our curl API](/api).
|
|
|
|
|
2019-02-07 09:49:00 +01:00
|
|
|
1. Configure a Jenkins log recorder for **jenkins.plugins.zulip**
|
2018-11-16 11:38:10 +01:00
|
|
|
and check why your messages fail to send.
|