Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(java): Require Jenkins core 2.479.3 and Java 17 #363

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 8
- name: Set up JDK 17
uses: actions/setup-java@v3.11.0
with:
java-version: 8
java-version: 17
distribution: 'temurin'

- name: next release version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/setup-java@v3.0.0
with:
distribution: 'temurin'
java-version: 8
java-version: 17

- name: Build
run: mvn --no-transfer-progress install -DskipTests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/setup-java@v3.11.0
with:
distribution: 'temurin'
java-version: 11
java-version: 17

- name: Javadoc
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spotbugs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/setup-java@v3.11.0
with:
distribution: 'temurin'
java-version: 11
java-version: 17

- name: SpotBugs
run: |
Expand Down
12 changes: 11 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
buildPlugin(platforms: ["linux"])
/*
* See the documentation for more options:
* https://github.com/jenkins-infra/pipeline-library/
*/
buildPlugin(
forkCount: '1C', // run this number of tests in parallel for faster feedback. If the number terminates with a 'C', the value will be multiplied by the number of available CPU cores
useContainerAgent: true, // Set to `false` if you need to use Docker for containerized tests
configurations: [
[platform: 'linux', jdk: 21],
[platform: 'windows', jdk: 17],
])
145 changes: 79 additions & 66 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.18</version>
<relativePath />
<version>5.9</version>
<relativePath/>
</parent>

<groupId>org.waveywaves.jenkins.plugins</groupId>
<artifactId>tekton-client</artifactId>
<version>${revision}${changelist}</version>
<name>Tekton Client Plugin</name>
<description>Tekton is a Cloud Native CI/CD tool for Kubernetes. This plugin helps in the creation and manipulation of Tekton Resources on you Kubernetes cluster and helps drive your operations from your Jenkins Server itself without having to carry them out from the Command Line Interface or any other User Interface.</description>
<description>Tekton is a Cloud Native CI/CD tool for Kubernetes. This plugin helps in the creation and manipulation
of Tekton Resources on you Kubernetes cluster and helps drive your operations from your Jenkins Server itself
without having to carry them out from the Command Line Interface or any other User Interface.
</description>
<packaging>hpi</packaging>
<url>https://github.com/jenkinsci/tekton-client-plugin</url>

Expand All @@ -24,14 +28,15 @@
</scm>

<properties>
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
<jenkins.baseline>2.479</jenkins.baseline>
<!-- Baseline Jenkins version you use to build the plugin. Users must have this version or newer to run. -->
<jenkins.version>2.263.1</jenkins.version>
<java.level>8</java.level>
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
<pipeline-model-definition.version>1.6.0</pipeline-model-definition.version>
<revision>1.0.0</revision>
<changelist>-SNAPSHOT</changelist>
<jenkins-test-harness.version>2.34</jenkins-test-harness.version>
<jenkins-test-harness.version>2414.v185474555e66</jenkins-test-harness.version>
<kubernetes-server-mock.version>5.4.0</kubernetes-server-mock.version>
<tekton-client.version>5.4.0</tekton-client.version>
<maven-surefire-plugin.version>2.22.1</maven-surefire-plugin.version>
Expand All @@ -48,13 +53,6 @@
</license>
</licenses>

<developers>
<developer>
<id>waveywaves</id>
<name>Vibhav Bobade</name>
</developer>
</developers>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -74,7 +72,7 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</exclusions>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
Expand All @@ -97,7 +95,6 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>github-branch-source</artifactId>
<version>2.9.7</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -115,57 +112,71 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>pipeline-utility-steps</artifactId>
<version>2.7.1</version>
<scope>test</scope>
</dependency>

</dependencies>
</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.249.x</artifactId>
<version>29</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jackson2-api</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.14.9</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
<version>3.14.9</version>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-${jenkins.baseline}.x</artifactId>
<version>4228.v0a_71308d905b_</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jackson2-api</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.14.9</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
<version>3.14.9</version>
</dependency>
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>org.apache.ivy</groupId>
<artifactId>ivy</artifactId>
<version>2.5.3</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jackson2-api</artifactId>
<version>2.17.0-379.v02de8ec9f64c</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>2.17.0</version>
</dependency>
</dependencies>
</dependencyManagement>

<repositories>
Expand All @@ -176,7 +187,8 @@
<repository>
<id>tags</id>
<name>Custom Tags</name>
<url>https://raw.githubusercontent.com/t-wanl/Jenkins-Dynamic-Databinding-UI-Control-Library/master/jar/</url>
<url>https://raw.githubusercontent.com/t-wanl/Jenkins-Dynamic-Databinding-UI-Control-Library/master/jar/
</url>
</repository>
</repositories>

Expand All @@ -203,7 +215,7 @@
<format>html</format>
<format>xml</format>
</formats>
<check />
<check/>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -250,8 +262,9 @@

<!-- lets remove any docs we don't need -->
<delete>
<fileset dir="src/main/resources/org/waveywaves/jenkins/plugins/tekton/client/jxp"
includes="**/*.md"/>
<fileset
dir="src/main/resources/org/waveywaves/jenkins/plugins/tekton/client/jxp"
includes="**/*.md"/>
</delete>
</target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import jenkins.model.GlobalConfiguration;
import jenkins.model.Jenkins;
import net.sf.json.JSONObject;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerRequest2;
import org.waveywaves.jenkins.plugins.tekton.client.TektonUtils;

import java.util.ArrayList;
Expand Down Expand Up @@ -37,7 +37,7 @@ public static TektonGlobalConfiguration get() {
}

@Override
public boolean configure(final StaplerRequest req, final JSONObject formData) {
public boolean configure(final StaplerRequest2 req, final JSONObject formData) {
Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
setClusterConfigs(req.bindJSONToList(ClusterConfig.class, formData.get("clusterConfigs")));
save();
Expand Down