About Jenkins CI
Jenkins is an open source Continuous Integration server that supports building, deploying and automating software projects. For more information about Jenkins, see official documentation.
About Jenkins CI Assistant
Developed by the Lark team, Jenkins CI Assistant allows you to get real-time development updates in Lark, making it easier to track, manage and communicate your development process.
With the Jenkins CI Assistant, you can:
- •Add the Jenkins CI Assistant bot to your project group in Lark, so the bot can keep your whole team updated on the associated Jenkins project.
- •Set up the Jenkins CI mobile gadget, so you can check the builds of your projects anytime on your mobile.
- 1. Configure bot in group
For your team to get notified for Jenkins project updates in a Lark group, you need to add the Jenkins CI Assistant bot to the group and configure the webhook settings using the Lark Jenkins plug-in.
1.1 Add bot to group
1.1.1 On Lark desktop, go to your team's group chat and add the Jenkins CI Assistant bot to the group. (For details, see Bot | Use bots in groups)
1.1.2 Get the webhook address from the bot by typing the command
@Jenkins CI Assistant get_webhook
The webhook address will be sent to the owner of the group only. Keep the URL available for use shortly.
Note: The following commands are also available for use:
@Jenkins CI Assistant help - Use this command in group chat or private chat with the bot to view help information.
@Jenkins CI Assistant reset_webhook - (group owner only) Use this command in group chat to reset the webhook address.
1.2 Install plug-in for Jenkins
1.2.1 Download the Lark plug-in package: Click here.
Keep the downloaded file available for use shortly.
1.2.2 (Jenkins administrator) Install the plugin package to Jenkins by launching Jenkins, navigating to Manage Jenkins and selecting Manage Plugins > Advanced.
In Upload Plugin, upload the file you just downloaded.
1.2.3 (Jenkins administrator) Back to the Manage Jenkins page, select Configure System. In the Jenkins Location section, enter the Jenkins URL in the following pattern:
myServer is the name of the system running Jenkins.
1.3 Configure plug-in in Jenkins
1.3.1 Go to a Jenkins project as appropriate, then choose Configure.
Note: Only Freestyle projects are supported.
1.3.2 Click Add post-build action, select Lark Jenkins Plugin to configure the trigger.
1.3.3 Paste the webhook URL that you obtained from the Jenkins CI Assistant bot previously in the send URL field, check the event types you want to receive notifications for, then click Save.
1.4 Test configuration
Test the configuration by triggering any of the events you've selected in the previous step. For example, start a build and see if you receive the notification in the associated Lark group.
The notification is a message card sent by the Jenkins CI Assistant bot, displaying job name, causeby, status and time cost. Click the Detail button to view the build page in your web browser.
1.5 Next steps
- •Now you have completed the configuration of the Jenkins CI Assistant bot, it will keep your whole team updated on the associated Jenkins projects in group chats.
- •Go on to the next section if you want to use the Jenkins CI Assistant gadget on your mobile. The gadget allows you to follow a list of the projects you're concerned with and check their builds without leaving Lark mobile.
- 2. Configure mobile gadget
Your team administrator must configure your company Jenkins address in Jenkins CI Assistant's configuration page.
Go to Lark Admin console > Workplace > App List and open the configuration page of Jenkins CI Assistant. To launch the configuration page of Jenkins CI Assistant, click Open Manager homepage.
Click Edit, enter your team's Jenkins address and save your changes.
2.2 Log in to gadget
To log in to the Jenkins CI Assistant gadget on your mobile, obtain the required API token from your Jenkins account.
2.2.1 Go to your Jenkins site user settings page.
2.2.2 Go to Configure > API Tokens, click Add new Token. Enter a name for the token as appropriate, then click Generate. Save the generated string and keep it available for use shortly.
2.2.3 Open Lark on mobile and launch the Jenkins CI Assistant app (not to be confused with the Jenkins CI Assistant bot), enter your Jenkins username and the API token obtained from the previous step, then click Log In.
2.2.4 Now when your Lark group receives a build update notification, you'd be able to click the Detail button on the message card on your mobile and check the build details in the Jenkins CI Assistant gadget.
2.3 Track build status of projects
The Jenkins CI Assistant gadget enables you to add the projects that you want to follow, in order to check their builds anytime on your mobile from the gadget Jobs tab.
To add a project in the gadget, find any notification card about this project in the associated group chat, and click Detail to open it in the mobile gadget. After that, all builds of this project will appear in the gadget Jobs tab.