2021-03-15 22:44:09 +01:00
|
|
|
1. {!create-stream.md!}
|
2017-06-22 13:32:18 +02:00
|
|
|
|
2021-03-15 22:44:09 +01:00
|
|
|
1. {!create-a-bot-indented.md!}
|
2018-11-16 11:38:10 +01:00
|
|
|
|
2021-03-15 22:44:09 +01:00
|
|
|
1. Install the "Zulip" plugin by going to
|
|
|
|
**Manage Jenkins > Manage Plugins > Available**,
|
|
|
|
typing in **Zulip**, and clicking **Install without Restart**.
|
2017-06-22 13:32:18 +02:00
|
|
|
|
2021-03-15 22:44:09 +01:00
|
|
|
![Plugin installation](/static/images/integrations/jenkins/001.png)
|
2017-06-22 13:32:18 +02:00
|
|
|
|
2021-03-15 22:44:09 +01:00
|
|
|
1. 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
|
|
|
|
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
|
|
|
|
2021-03-15 22:44:09 +01:00
|
|
|
(If you don't see this option, you may first need to restart
|
|
|
|
Jenkins.)
|
2017-06-22 13:32:18 +02:00
|
|
|
|
2021-03-15 22:44:09 +01:00
|
|
|
![Plugin configuration](/static/images/integrations/jenkins/002.png)
|
2017-06-22 13:32:18 +02:00
|
|
|
|
2021-03-15 22:44:09 +01:00
|
|
|
1. Once you've done that, it's time to configure one of your
|
|
|
|
freestyle projects to use the Zulip notification plugin. On your
|
|
|
|
Jenkins project page, click **Configure** on the left sidebar. Scroll to
|
|
|
|
the bottom until you find the section labeled **Post-build
|
|
|
|
Actions**. Click the dropdown and select **Zulip Notification**.
|
|
|
|
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
|
|
|
|
2021-03-15 22:44:09 +01:00
|
|
|
![Post-build action configuration](/static/images/integrations/jenkins/003.png)
|
2017-06-22 13:32:18 +02:00
|
|
|
|
2021-03-15 22:44:09 +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!}
|
|
|
|
|
2020-08-05 11:50:17 +02:00
|
|
|
![Jenkins bot message](/static/images/integrations/jenkins/004.png)
|
2017-06-22 13:32:18 +02:00
|
|
|
|
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.
|