How anurag-sisodiya/jenkins-chatbot-plugin works
1. What this repository is
- This is a Jenkins plugin named *Jenkins Console Chatbot Plugin*.
- It lives entirely inside the Jenkins controller/runtime; there is no separate application server or standalone backend in the repo.
- The plugin’s purpose is to add a chatbot panel to build consoles so users can ask questions about the current build’s logs and execution.
2. Primary architectural boundary
- The main boundary is between Jenkins core extension points and the plugin’s own logic under com.anurag.jenkins.chatbot.
- The plugin is built around standard Jenkins plugin concepts: Action, RunListener, and GlobalConfiguration.
3. Build lifecycle integration
- ChatbotRunListener is the lifecycle hook into Jenkins builds.
- This component is where the plugin can observe build events and associate chatbot behavior with a specific run.
- Architecturally, it connects the Jenkins build execution stream to the chatbot feature set.
4. Per-build UI surface
- ChatbotAction represents the build-scoped feature exposed in the Jenkins UI.
- The action is rendered by src/main/resources/.../ChatbotAction/index.jelly, which is a classic Jenkins server-side view.
- This is the main user-facing entry point from a build console page into the chatbot experience.
5. Chatbot request/API layer
- ChatbotApi is the likely request-handling layer for interactions coming from the chatbot panel.
- In architecture terms, it sits between the UI and whatever logic answers questions using build context.
- Because this is a Jenkins plugin, these calls are expected to stay inside the Jenkins process and operate on the current build data.
6. Global configuration
- ChatbotGlobalConfiguration provides instance-wide plugin settings.
- The presence of config.jelly and the help files for apiUrl and modelName indicates configurable integration points for chatbot behavior.
- This is the plugin’s global settings boundary: admin-configured values that affect all builds.
7. UI resources and Jenkins views
- The src/main/resources Jelly files define the Jenkins configuration and build-page UI.
- src/main/webapp/help/* provides inline Jenkins help text for configuration fields.
- These resources show that the plugin uses Jenkins’ native UI rendering rather than a separate frontend application.
8. Data flow through the plugin
- A build runs in Jenkins.
- ChatbotRunListener observes the run and the plugin attaches or exposes ChatbotAction.
- The build page loads the chatbot panel through the Jelly view.
- User questions are handled through ChatbotApi, which uses the current build context and global settings to produce a response.
9. Configuration vs. runtime context
- Global settings such as API endpoint and model name are stored in ChatbotGlobalConfiguration.
- Runtime context comes from the active Jenkins build/run and is accessed through the action/listener path.
- This separation is important for an architecture diagram: admin configuration is global, while chat interaction is build-specific.
10. Packaging and platform
- The project is built with Maven and packaged as a Jenkins .hpi plugin.
- pom.xml, .mvn/*, and Jenkinsfile indicate standard Java plugin build and CI flow.
- This is a Java-based Jenkins extension, not a microservice or containerized app.
11. Repository automation
- GitHub Actions are used for security scanning and release drafting.
- dependabot.yml suggests dependency update automation.
- These are repo/maintenance concerns, not part of the plugin’s runtime architecture, but they shape delivery and release flow.
12. Testing boundary
- The test suite is small and centered on ChatbotActionTest.
- That implies the most important verified behavior is likely the action/UI-facing plugin behavior rather than a large standalone service layer.
13. What is notably absent
- There is no separate database, queue, message broker, or external service code in the repo tree.
- The architecture appears intentionally lightweight: Jenkins plugin + Jenkins UI + plugin configuration + build-context interaction.
Main entry points: pom.xml Jenkins Plugin · ChatbotGlobalConfiguration.java Global Config · ChatbotAction.java Chatbot Action · index.jelly Action View
Components 16
Jenkins plugin runtime
Core plugin classes running inside the Jenkins controller and build lifecycle.
- Chatbot Action · Build-scoped entry point exposed on a run page.
src/main/java/com/anurag/jenkins/chatbot/ChatbotAction.java - Run Listener · Observes Jenkins run events and connects builds to chatbot behavior.
src/main/java/com/anurag/jenkins/chatbot/ChatbotRunListener.java - Chatbot API · Handles chatbot interactions using build context and plugin settings.
src/main/java/com/anurag/jenkins/chatbot/ChatbotApi.java
Jenkins UI
Server-side views and build-page surfaces rendered by Jenkins.
- Action View · Build-page UI for the chatbot action.
src/main/resources/com/anurag/jenkins/chatbot/ChatbotAction/index.jelly - Root View · Top-level Jelly resource used by the plugin UI.
src/main/resources/index.jelly
Plugin configuration
Global settings and inline help exposed in Jenkins configuration.
- Global Config · Stores instance-wide settings such as API endpoint and model name.
src/main/java/com/anurag/jenkins/chatbot/ChatbotGlobalConfiguration.java - Config View · Global configuration form rendered in Jenkins.
src/main/resources/com/anurag/jenkins/chatbot/ChatbotGlobalConfiguration/config.jelly - Help apiUrl · Inline help for the API URL configuration field.
src/main/webapp/help/help-apiUrl.html - Help modelName · Inline help for the model name configuration field.
src/main/webapp/help/help-modelName.html
Build and delivery
Maven build, Jenkins CI, and repo automation files.
- Jenkins Plugin · Maven-built Jenkins .hpi plugin packaging and metadata.
pom.xml - Maven Config · Maven wrapper and extension settings for building the plugin.
.mvn/maven.config - Maven Extensions · Maven extension wiring for the repository build.
.mvn/extensions.xml - Jenkinsfile · Jenkins-based automation for building and validating the plugin.
Jenkinsfile - Security Scan · Workflow for Jenkins security scanning.
.github/workflows/jenkins-security-scan.yml - Release Drafter · Workflow for preparing release drafts.
.github/workflows/release-drafter.yml - Action Test · Focused test coverage for the build action behavior.
src/test/java/com/anurag/jenkins/chatbot/ChatbotActionTest.java
Connections 17
- Run Listener → Chatbot Action: attaches · Run events lead to a build-scoped chatbot action.
- Chatbot Action → Action View: renders · The action is presented through the build-page Jelly view.
- Chatbot Action → Chatbot API: invokes · UI interactions from the action route into the API layer.
- Chatbot API → Global Config: uses settings · Request handling depends on global plugin configuration.
- Run Listener → Global Config: reads config · Lifecycle behavior can be influenced by instance-wide settings.
- Global Config → Config View: configured by · The config model is rendered by the Jenkins configuration view.
- Global Config → Help apiUrl: explains · Help text documents the API URL field.
- Global Config → Help modelName: explains · Help text documents the model name field.
- Jenkins Plugin → Chatbot Action: packages · The Maven plugin build packages the runtime classes.
- Jenkins Plugin → Global Config: packages · The build includes global configuration classes.
- Jenkins Plugin → Action View: bundles · Jelly resources are bundled with the plugin artifact.
- Jenkins Plugin → Config View: bundles · Configuration views ship inside the plugin artifact.
- Jenkinsfile → Jenkins Plugin: builds · Jenkins CI executes the plugin build.
- Security Scan → Jenkins Plugin: checks · Security scanning runs against the plugin project.
- Release Drafter → Jenkins Plugin: releases · Release automation prepares publishing metadata.
- Action Test → Chatbot Action: verifies · Tests focus on build-action behavior.
- Root View → Action View: shares UI · Repository Jelly resources support the plugin UI surface.