Skip to content

Commit a0372d5

Browse files
authored
Merge pull request #5 from saurabh-oss/jenkins-hosting-compliance
chore: address all reviewer feedback from Jenkins hosting review
2 parents 468f402 + 82993d3 commit a0372d5

6 files changed

Lines changed: 76 additions & 131 deletions

File tree

pom.xml

Lines changed: 6 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
Architecture Drift Detection, Test Gap Analysis, Release Readiness Scoring, and more.
2323
Supports OpenAI, Anthropic Claude, Ollama (local), LM Studio, and custom LLM endpoints.
2424
</description>
25-
<url>https://github.com/saurabh-oss/forgeai-pipeline-intelligence</url>
25+
<url>https://github.com/jenkinsci/forgeai-pipeline-intelligence-plugin</url>
2626

2727
<licenses>
2828
<license>
@@ -32,20 +32,20 @@
3232
</licenses>
3333

3434
<scm>
35-
<connection>scm:git:https://github.com/saurabh-oss/forgeai-pipeline-intelligence.git</connection>
36-
<developerConnection>scm:git:git@github.com:saurabh-oss/forgeai-pipeline-intelligence.git</developerConnection>
37-
<url>https://github.com/saurabh-oss/forgeai-pipeline-intelligence</url>
35+
<connection>scm:git:https://github.com/jenkinsci/forgeai-pipeline-intelligence-plugin.git</connection>
36+
<developerConnection>scm:git:git@github.com:jenkinsci/forgeai-pipeline-intelligence-plugin.git</developerConnection>
37+
<url>https://github.com/jenkinsci/forgeai-pipeline-intelligence-plugin</url>
3838
<tag>${scmTag}</tag>
3939
</scm>
4040

4141
<properties>
4242
<jenkins.baseline>2.528</jenkins.baseline>
4343
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
4444
<changelist>999999-SNAPSHOT</changelist>
45-
<hpi.compatibleSinceVersion>1.0.0</hpi.compatibleSinceVersion>
4645
<hpi.strictBundledArtifacts>true</hpi.strictBundledArtifacts>
4746
<ban-commons-lang-2.skip>false</ban-commons-lang-2.skip>
48-
<gitHubRepo>saurabh-oss/forgeai-pipeline-intelligence</gitHubRepo>
47+
<ban-deprecated-stapler.skip>false</ban-deprecated-stapler.skip>
48+
<gitHubRepo>jenkinsci/forgeai-pipeline-intelligence-plugin</gitHubRepo>
4949
</properties>
5050

5151
<dependencyManagement>
@@ -61,11 +61,6 @@
6161
</dependencyManagement>
6262

6363
<dependencies>
64-
<!-- Jenkins Core Dependencies -->
65-
<dependency>
66-
<groupId>org.jenkins-ci.plugins</groupId>
67-
<artifactId>structs</artifactId>
68-
</dependency>
6964
<dependency>
7065
<groupId>org.jenkins-ci.plugins.workflow</groupId>
7166
<artifactId>workflow-step-api</artifactId>
@@ -98,26 +93,15 @@
9893
<groupId>org.jenkins-ci.plugins</groupId>
9994
<artifactId>git</artifactId>
10095
</dependency>
101-
102-
<!-- HTTP Client via Jenkins API plugin (replaces direct okhttp3 bundling) -->
10396
<dependency>
10497
<groupId>io.jenkins.plugins</groupId>
10598
<artifactId>okhttp-api</artifactId>
10699
</dependency>
107-
108-
<!-- JSON Processing via Jenkins API plugin (replaces direct gson bundling) -->
109100
<dependency>
110101
<groupId>io.jenkins.plugins</groupId>
111102
<artifactId>gson-api</artifactId>
112103
</dependency>
113104

114-
<!-- Markdown to HTML for reports -->
115-
<dependency>
116-
<groupId>com.vladsch.flexmark</groupId>
117-
<artifactId>flexmark-all</artifactId>
118-
<version>0.64.8</version>
119-
</dependency>
120-
121105
<!-- Test Dependencies -->
122106
<dependency>
123107
<groupId>org.jenkins-ci.plugins.workflow</groupId>
@@ -147,48 +131,4 @@
147131
</pluginRepository>
148132
</pluginRepositories>
149133

150-
<build>
151-
<plugins>
152-
<plugin>
153-
<groupId>org.jenkins-ci.tools</groupId>
154-
<artifactId>maven-hpi-plugin</artifactId>
155-
<configuration>
156-
<minimumJavaVersion>17</minimumJavaVersion>
157-
</configuration>
158-
</plugin>
159-
<plugin>
160-
<groupId>org.apache.maven.plugins</groupId>
161-
<artifactId>maven-compiler-plugin</artifactId>
162-
<configuration>
163-
<release>17</release>
164-
<testRelease>17</testRelease>
165-
</configuration>
166-
</plugin>
167-
<plugin>
168-
<groupId>org.apache.maven.plugins</groupId>
169-
<artifactId>maven-surefire-plugin</artifactId>
170-
<version>3.2.5</version>
171-
</plugin>
172-
<plugin>
173-
<groupId>org.jacoco</groupId>
174-
<artifactId>jacoco-maven-plugin</artifactId>
175-
<version>0.8.13</version>
176-
<executions>
177-
<execution>
178-
<goals><goal>prepare-agent</goal></goals>
179-
<configuration>
180-
<excludes>
181-
<exclude>org/htmlunit/css/StyleAttributes$Definition</exclude>
182-
</excludes>
183-
</configuration>
184-
</execution>
185-
<execution>
186-
<id>report</id>
187-
<phase>verify</phase>
188-
<goals><goal>report</goal></goals>
189-
</execution>
190-
</executions>
191-
</plugin>
192-
</plugins>
193-
</build>
194134
</project>

src/main/java/io/forgeai/jenkins/llm/LLMProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package io.forgeai.jenkins.llm;
22

3+
import hudson.ExtensionPoint;
34
import java.io.Serializable;
45

56
/**
67
* Abstraction over any LLM backend.
78
* Implementations: OpenAI, Anthropic Claude, Ollama (local), LM Studio, Custom HTTP endpoint.
89
*/
9-
public interface LLMProvider extends Serializable {
10+
public interface LLMProvider extends ExtensionPoint, Serializable {
1011

1112
/**
1213
* Send a prompt to the LLM and receive a text completion.

src/main/java/io/forgeai/jenkins/steps/DirectoryTreeCallable.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package io.forgeai.jenkins.steps;
22

33
import hudson.remoting.VirtualChannel;
4-
import jenkins.MasterToSlaveFileCallable;
4+
import jenkins.ControllerToAgentFileCallable;
55

66
import java.io.File;
77
import java.io.IOException;
@@ -11,7 +11,7 @@
1111
/**
1212
* Runs on the agent node to list the top-level workspace structure.
1313
*/
14-
public class DirectoryTreeCallable extends MasterToSlaveFileCallable<String> {
14+
public class DirectoryTreeCallable implements ControllerToAgentFileCallable<String> {
1515
private static final long serialVersionUID = 1L;
1616

1717
@Override

src/main/java/io/forgeai/jenkins/steps/ForgeAIStep.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ protected Map<String, Object> run() throws Exception {
150150

151151
// ── Generate HTML Report ──
152152
if (cfg.isPublishHtmlReport() && !results.isEmpty()) {
153-
String projectName = env.getOrDefault("JOB_NAME", "unknown");
154-
String buildNum = env.getOrDefault("BUILD_NUMBER", "0");
153+
String projectName = build.getParent().getFullName();
154+
String buildNum = String.valueOf(build.getNumber());
155155
String html = ForgeAIReportGenerator.generateHtml(results, projectName, buildNum);
156156

157157
FilePath reportDir = new FilePath(workspace, "forgeai-reports");

src/main/resources/io/forgeai/jenkins/config/ForgeAIGlobalConfiguration/config.jelly

Lines changed: 45 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
<?jelly escape-by-default='true'?>
22
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:c="/lib/credentials">
33

4-
<f:section title="🔥 ForgeAI Pipeline Intelligence">
5-
6-
<f:description>
7-
<div style="padding:10px;background:#1e293b;border-radius:8px;color:#e2e8f0;margin-bottom:12px">
8-
<strong>ForgeAI</strong> — AI-Powered Pipeline Intelligence.<br/>
9-
Configure your LLM provider, enable/disable analyzers, and set quality gates.
10-
</div>
11-
</f:description>
4+
<f:section title="ForgeAI Pipeline Intelligence">
125

136
<!-- ── LLM Provider ──────────────────────────────────────────── -->
147
<f:entry title="LLM Provider" field="providerType">
@@ -21,7 +14,7 @@
2114
</f:entry>
2215

2316
<f:entry title="Model ID" field="modelId"
24-
description="E.g. gpt-4o, claude-sonnet-4-20250514, codellama:13b, deepseek-coder:33b">
17+
description="E.g. gpt-4o, claude-sonnet-4-20250514, codellama:13b">
2518
<f:textbox/>
2619
</f:entry>
2720

@@ -32,74 +25,66 @@
3225

3326
<f:entry title="Temperature" field="temperature"
3427
description="0.0 = deterministic, 1.0 = creative. Recommended: 0.1 – 0.3 for code analysis.">
35-
<f:textbox default="0.2"/>
28+
<f:number clazz="setting-input" min="0" max="1" step="0.1" default="0.2"/>
3629
</f:entry>
3730

3831
<f:entry title="Timeout (seconds)" field="timeoutSeconds">
39-
<f:textbox default="120"/>
32+
<f:number clazz="setting-input" min="10" default="120"/>
4033
</f:entry>
4134

4235
<f:entry title="Max Response Tokens" field="maxTokens">
43-
<f:textbox default="4096"/>
36+
<f:number clazz="setting-input" min="256" default="4096"/>
4437
</f:entry>
4538

4639
<f:validateButton title="Test Connection" progress="Testing..."
4740
method="testConnection"
4841
with="providerType,llmEndpoint,modelId,apiKeyCredentialId"/>
4942

50-
<!-- ── Feature Toggles ───────────────────────────────────────── -->
51-
<f:section title="Analyzer Modules">
52-
53-
<f:entry title="AI Code Review" field="enableCodeReview">
54-
<f:checkbox default="true"/>
55-
</f:entry>
56-
<f:entry title="Vulnerability Analysis" field="enableVulnerabilityAnalysis">
57-
<f:checkbox default="true"/>
58-
</f:entry>
59-
<f:entry title="Architecture Drift Detection" field="enableArchitectureDrift">
60-
<f:checkbox default="true"/>
61-
</f:entry>
62-
<f:entry title="Test Gap Analysis" field="enableTestGapAnalysis">
63-
<f:checkbox default="true"/>
64-
</f:entry>
65-
<f:entry title="Dependency Risk Scoring" field="enableDependencyRisk">
66-
<f:checkbox default="true"/>
67-
</f:entry>
68-
<f:entry title="Commit Intelligence" field="enableCommitIntelligence">
69-
<f:checkbox default="true"/>
70-
</f:entry>
71-
<f:entry title="Pipeline Optimization Advisor" field="enablePipelineAdvisor">
72-
<f:checkbox default="true"/>
73-
</f:entry>
74-
<f:entry title="Release Readiness Score" field="enableReleaseReadiness">
75-
<f:checkbox default="true"/>
76-
</f:entry>
77-
78-
</f:section>
43+
<!-- ── Analyzer Modules ──────────────────────────────────────── -->
44+
<f:entry title="AI Code Review" field="enableCodeReview">
45+
<f:checkbox default="true"/>
46+
</f:entry>
47+
<f:entry title="Vulnerability Analysis" field="enableVulnerabilityAnalysis">
48+
<f:checkbox default="true"/>
49+
</f:entry>
50+
<f:entry title="Architecture Drift Detection" field="enableArchitectureDrift">
51+
<f:checkbox default="true"/>
52+
</f:entry>
53+
<f:entry title="Test Gap Analysis" field="enableTestGapAnalysis">
54+
<f:checkbox default="true"/>
55+
</f:entry>
56+
<f:entry title="Dependency Risk Scoring" field="enableDependencyRisk">
57+
<f:checkbox default="true"/>
58+
</f:entry>
59+
<f:entry title="Commit Intelligence" field="enableCommitIntelligence">
60+
<f:checkbox default="true"/>
61+
</f:entry>
62+
<f:entry title="Pipeline Optimization Advisor" field="enablePipelineAdvisor">
63+
<f:checkbox default="true"/>
64+
</f:entry>
65+
<f:entry title="Release Readiness Score" field="enableReleaseReadiness">
66+
<f:checkbox default="true"/>
67+
</f:entry>
7968

8069
<!-- ── Quality Gate ──────────────────────────────────────────── -->
81-
<f:section title="Quality Gate &amp; Reporting">
82-
83-
<f:entry title="Publish HTML Report" field="publishHtmlReport">
84-
<f:checkbox default="true"/>
85-
</f:entry>
86-
87-
<f:entry title="Fail Build on Low Score" field="failOnCritical"
88-
description="Fail the build when composite score falls below the threshold.">
89-
<f:checkbox default="false"/>
90-
</f:entry>
70+
<f:entry title="Publish HTML Report" field="publishHtmlReport">
71+
<f:checkbox default="true"/>
72+
</f:entry>
9173

92-
<f:entry title="Score Threshold (1-10)" field="criticalThreshold"
93-
description="Minimum composite score to pass the quality gate.">
94-
<f:textbox default="3"/>
95-
</f:entry>
74+
<f:entry title="Fail Build on Low Score" field="failOnCritical"
75+
description="Fail the build when composite score falls below the threshold.">
76+
<f:checkbox default="false"/>
77+
</f:entry>
9678

97-
<f:entry title="Custom System Prompt (Advanced)" field="customSystemPrompt"
98-
description="Optional: prepend custom instructions to all analyzer prompts.">
99-
<f:textarea/>
100-
</f:entry>
79+
<f:entry title="Score Threshold (1-10)" field="criticalThreshold"
80+
description="Minimum composite score to pass the quality gate.">
81+
<f:number clazz="setting-input" min="1" max="10" default="3"/>
82+
</f:entry>
10183

102-
</f:section>
84+
<f:entry title="Custom System Prompt (Advanced)" field="customSystemPrompt"
85+
description="Optional: prepend custom instructions to all analyzer prompts.">
86+
<f:textarea/>
87+
</f:entry>
10388

10489
</f:section>
10590

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?jelly escape-by-default='true'?>
2+
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
3+
4+
<f:entry title="Analyzer" field="analyzer"
5+
description="The analysis type to run: code-review, vulnerability, architecture-drift, test-gaps, dependency-risk, commit-intel, pipeline-advisor, release-readiness">
6+
<f:textbox/>
7+
</f:entry>
8+
9+
<f:entry title="Source" field="source"
10+
description="Source code or content to analyze. Use readFile() to pass file contents.">
11+
<f:textarea/>
12+
</f:entry>
13+
14+
<f:entry title="Context" field="context"
15+
description="Optional additional context for the analyzer (e.g. PR description, JIRA ticket).">
16+
<f:textarea/>
17+
</f:entry>
18+
19+
</j:jelly>

0 commit comments

Comments
 (0)