Skip to content

Commit 55332ad

Browse files
Migrate documentation from Wiki to GitHub (#57)
* docs: migrate documentation from Jenkins Wiki to GitHub README * docs: address review feedback
1 parent 23a5e18 commit 55332ad

File tree

2 files changed

+43
-4
lines changed

2 files changed

+43
-4
lines changed

README.md

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,43 @@
1-
JDK Parameter Choice Plugin
2-
==================================
1+
# JDK Parameter Plugin
32

4-
The JDK Parameter Choice Plugin allows you to set a specific JDK to be used with a job at the start of each build.
3+
Adds a build parameter that allows selecting a configured JDK installation for each build.
4+
5+
## Description
6+
7+
This plugin adds a build parameter that allows setting which JDK should be used for a job on a per-build basis.
8+
9+
The JDKs available for selection can be configured on the job configuration page when the JDK parameter is enabled.
10+
11+
## Configuration
12+
13+
1. Go to **Manage Jenkins → Global Tool Configuration**
14+
2. Configure one or more JDK installations
15+
3. Save the configuration
16+
17+
To use in a job:
18+
19+
1. Open the job configuration page
20+
2. Enable **This build is parameterized**
21+
3. Add parameter → Select **JDK Parameter**
22+
4. Choose the default JDK and allowed JDK selections
23+
24+
## Usage
25+
26+
On the build parameters page, a dropdown list allows selecting which configured JDK should be used for that build.
27+
28+
## Pipeline Usage Example
29+
30+
```groovy
31+
pipeline {
32+
agent any
33+
parameters {
34+
jdk(name: 'JDK17')
35+
}
36+
stages {
37+
stage('Check Java Version') {
38+
steps {
39+
sh 'java -version'
40+
}
41+
}
42+
}
43+
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<version>1.4-SNAPSHOT</version>
1414
<name>JDK Parameter Plugin</name>
1515
<packaging>hpi</packaging>
16-
<url>https://wiki.jenkins-ci.org/display/JENKINS/JDK+Parameter+Plugin</url>
16+
<url>https://github.com/jenkinsci/JDK_Parameter_Plugin-plugin</url>
1717

1818
<licenses>
1919
<license>

0 commit comments

Comments
 (0)