Skip to content

Commit 9c1d58d

Browse files
authored
Enable spotless (#1478)
* Enable spotless * Robustness fix on tests * Ensure there are no Jenkins nodes remaining after the test
1 parent 254177e commit 9c1d58d

File tree

143 files changed

+4051
-3068
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+4051
-3068
lines changed

pom.xml

Lines changed: 121 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
12
<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">
23
<modelVersion>4.0.0</modelVersion>
34
<parent>
45
<groupId>org.jenkins-ci.plugins</groupId>
56
<artifactId>plugin</artifactId>
67
<version>4.75</version>
7-
<relativePath/>
8+
<relativePath />
89
</parent>
910

1011
<groupId>org.csanchez.jenkins.plugins</groupId>
1112
<artifactId>kubernetes</artifactId>
1213
<version>${changelist}</version>
14+
<packaging>hpi</packaging>
1315
<name>Kubernetes plugin</name>
1416
<description>Jenkins plugin to run dynamic agents in a Kubernetes cluster</description>
15-
<packaging>hpi</packaging>
1617
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
1718

18-
<scm>
19-
<connection>scm:git:https://github.com/${gitHubRepo}.git</connection>
20-
<developerConnection>scm:git:https://github.com/${gitHubRepo}.git</developerConnection>
21-
<url>https://github.com/${gitHubRepo}</url>
22-
<tag>${scmTag}</tag>
23-
</scm>
24-
2519
<licenses>
2620
<license>
2721
<name>Apache License 2.0</name>
@@ -38,6 +32,13 @@
3832
</developer>
3933
</developers>
4034

35+
<scm>
36+
<connection>scm:git:https://github.com/${gitHubRepo}.git</connection>
37+
<developerConnection>scm:git:https://github.com/${gitHubRepo}.git</developerConnection>
38+
<tag>${scmTag}</tag>
39+
<url>https://github.com/${gitHubRepo}</url>
40+
</scm>
41+
4142
<properties>
4243
<changelist>999999-SNAPSHOT</changelist>
4344
<!-- in minikube
@@ -53,123 +54,136 @@
5354
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
5455
<spotbugs.effort>Max</spotbugs.effort>
5556
<spotbugs.threshold>Low</spotbugs.threshold>
57+
<spotless.check.skip>false</spotless.check.skip>
5658
</properties>
5759

60+
<dependencyManagement>
61+
<dependencies>
62+
<dependency>
63+
<groupId>io.jenkins.tools.bom</groupId>
64+
<artifactId>bom-${bom}</artifactId>
65+
<version>${bom.version}</version>
66+
<type>pom</type>
67+
<scope>import</scope>
68+
</dependency>
69+
<dependency>
70+
<groupId>com.squareup.okhttp3</groupId>
71+
<artifactId>mockwebserver</artifactId>
72+
<version>4.9.3</version>
73+
<!-- should be aligned with the version provided by okhttp-api-plugin -->
74+
</dependency>
75+
</dependencies>
76+
</dependencyManagement>
77+
5878
<dependencies>
5979
<dependency>
60-
<groupId>org.jenkins-ci.plugins</groupId>
61-
<artifactId>kubernetes-client-api</artifactId>
80+
<groupId>io.jenkins.plugins</groupId>
81+
<artifactId>caffeine-api</artifactId>
6282
</dependency>
6383
<dependency>
6484
<groupId>org.jenkins-ci.plugins</groupId>
65-
<artifactId>jackson2-api</artifactId>
85+
<artifactId>authentication-tokens</artifactId>
6686
</dependency>
87+
6788
<dependency>
89+
<!-- Requires Permission -->
6890
<groupId>org.jenkins-ci.plugins</groupId>
69-
<artifactId>structs</artifactId>
91+
<artifactId>cloudbees-folder</artifactId>
7092
</dependency>
7193
<dependency>
7294
<groupId>org.jenkins-ci.plugins</groupId>
7395
<artifactId>credentials</artifactId>
7496
</dependency>
7597
<dependency>
7698
<groupId>org.jenkins-ci.plugins</groupId>
77-
<artifactId>plain-credentials</artifactId>
99+
<artifactId>credentials-binding</artifactId>
78100
</dependency>
101+
79102
<dependency>
80-
<groupId>org.jenkinsci.plugins</groupId>
81-
<artifactId>kubernetes-credentials</artifactId>
103+
<groupId>org.jenkins-ci.plugins</groupId>
104+
<artifactId>durable-task</artifactId>
82105
</dependency>
83106
<dependency>
84107
<groupId>org.jenkins-ci.plugins</groupId>
85-
<artifactId>authentication-tokens</artifactId>
108+
<artifactId>jackson2-api</artifactId>
86109
</dependency>
87-
88-
<dependency> <!-- Requires Permission -->
110+
<dependency>
89111
<groupId>org.jenkins-ci.plugins</groupId>
90-
<artifactId>cloudbees-folder</artifactId>
112+
<artifactId>kubernetes-client-api</artifactId>
91113
</dependency>
92-
93114
<dependency>
94115
<groupId>org.jenkins-ci.plugins</groupId>
95-
<artifactId>durable-task</artifactId>
116+
<artifactId>metrics</artifactId>
96117
</dependency>
97118
<dependency>
98119
<groupId>org.jenkins-ci.plugins</groupId>
99-
<artifactId>variant</artifactId>
120+
<artifactId>plain-credentials</artifactId>
100121
</dependency>
101122
<dependency>
102-
<groupId>org.jenkins-ci.plugins.workflow</groupId>
103-
<artifactId>workflow-step-api</artifactId>
123+
<groupId>org.jenkins-ci.plugins</groupId>
124+
<artifactId>structs</artifactId>
125+
</dependency>
126+
<dependency>
127+
<groupId>org.jenkins-ci.plugins</groupId>
128+
<artifactId>variant</artifactId>
104129
</dependency>
105130
<dependency>
106131
<groupId>org.jenkins-ci.plugins.workflow</groupId>
107132
<artifactId>workflow-api</artifactId>
108133
</dependency>
109-
<dependency> <!-- DeclarativeAgent -->
110-
<groupId>org.jenkinsci.plugins</groupId>
111-
<artifactId>pipeline-model-extensions</artifactId>
112-
<optional>true</optional>
113-
</dependency>
114-
<dependency> <!-- DeclarativeGeneratorTester -->
115-
<groupId>org.jenkinsci.plugins</groupId>
116-
<artifactId>pipeline-model-definition</artifactId>
117-
<classifier>tests</classifier>
118-
<scope>test</scope>
119-
</dependency>
120134
<dependency>
121135
<groupId>org.jenkins-ci.plugins.workflow</groupId>
122136
<artifactId>workflow-cps</artifactId>
123137
<optional>true</optional>
124138
</dependency>
125139
<dependency>
126-
<groupId>org.jenkins-ci.plugins</groupId>
127-
<artifactId>metrics</artifactId>
140+
<groupId>org.jenkins-ci.plugins.workflow</groupId>
141+
<artifactId>workflow-durable-task-step</artifactId>
128142
</dependency>
129143
<dependency>
130-
<groupId>io.jenkins.plugins</groupId>
131-
<artifactId>caffeine-api</artifactId>
144+
<groupId>org.jenkins-ci.plugins.workflow</groupId>
145+
<artifactId>workflow-step-api</artifactId>
132146
</dependency>
133147
<dependency>
134-
<groupId>org.jenkins-ci.plugins</groupId>
135-
<artifactId>credentials-binding</artifactId>
148+
<groupId>org.jenkinsci.plugins</groupId>
149+
<artifactId>kubernetes-credentials</artifactId>
136150
</dependency>
137151
<dependency>
138-
<groupId>org.jenkins-ci.plugins.workflow</groupId>
139-
<artifactId>workflow-durable-task-step</artifactId>
152+
<!-- DeclarativeAgent -->
153+
<groupId>org.jenkinsci.plugins</groupId>
154+
<artifactId>pipeline-model-extensions</artifactId>
155+
<optional>true</optional>
140156
</dependency>
141-
142-
<!-- for testing -->
143157
<dependency>
144-
<groupId>org.jenkins-ci.plugins.workflow</groupId>
145-
<artifactId>workflow-job</artifactId>
158+
<groupId>io.fabric8</groupId>
159+
<artifactId>kubernetes-server-mock</artifactId>
160+
<version>6.8.1</version>
146161
<scope>test</scope>
147162
</dependency>
148163
<dependency>
149-
<groupId>org.jenkins-ci.plugins.workflow</groupId>
150-
<artifactId>workflow-basic-steps</artifactId>
164+
<groupId>io.jenkins</groupId>
165+
<artifactId>configuration-as-code</artifactId>
151166
<scope>test</scope>
152167
</dependency>
153-
<dependency> <!-- SemaphoreStep -->
154-
<groupId>org.jenkins-ci.plugins.workflow</groupId>
155-
<artifactId>workflow-support</artifactId>
156-
<classifier>tests</classifier>
168+
<dependency>
169+
<groupId>io.jenkins.configuration-as-code</groupId>
170+
<artifactId>test-harness</artifactId>
157171
<scope>test</scope>
158172
</dependency>
159173
<dependency>
160-
<groupId>org.jenkinsci.plugins</groupId>
161-
<artifactId>pipeline-model-definition</artifactId>
174+
<groupId>org.awaitility</groupId>
175+
<artifactId>awaitility</artifactId>
176+
<version>4.2.0</version>
162177
<scope>test</scope>
163178
</dependency>
164-
<dependency> <!-- SnippetizerTest -->
165-
<groupId>org.jenkins-ci.plugins.workflow</groupId>
166-
<artifactId>workflow-cps</artifactId>
167-
<classifier>tests</classifier>
179+
<dependency>
180+
<groupId>org.jenkins-ci.plugins</groupId>
181+
<artifactId>bouncycastle-api</artifactId>
168182
<scope>test</scope>
169183
</dependency>
170184
<dependency>
171-
<groupId>org.mockito</groupId>
172-
<artifactId>mockito-core</artifactId>
185+
<groupId>org.jenkins-ci.plugins</groupId>
186+
<artifactId>docker-workflow</artifactId>
173187
<scope>test</scope>
174188
</dependency>
175189
<dependency>
@@ -184,10 +198,16 @@
184198
<scope>test</scope>
185199
</dependency>
186200
<dependency>
201+
<!-- Required to test run src/main/resources/org/csanchez/jenkins/plugins/kubernetes/pipeline/samples/maven.groovy -->
187202
<groupId>org.jenkins-ci.plugins</groupId>
188-
<artifactId>scm-api</artifactId>
203+
<artifactId>junit</artifactId>
189204
<scope>test</scope>
205+
</dependency>
206+
<dependency>
207+
<groupId>org.jenkins-ci.plugins</groupId>
208+
<artifactId>scm-api</artifactId>
190209
<classifier>tests</classifier>
210+
<scope>test</scope>
191211
</dependency>
192212
<!-- for ContainerExecDecoratorPipelineTest -->
193213
<dependency>
@@ -201,68 +221,70 @@
201221
<scope>test</scope>
202222
</dependency>
203223
<dependency>
204-
<groupId>org.jenkins-ci.plugins</groupId>
205-
<artifactId>bouncycastle-api</artifactId>
224+
<groupId>org.jenkins-ci.plugins.workflow</groupId>
225+
<artifactId>workflow-basic-steps</artifactId>
206226
<scope>test</scope>
207227
</dependency>
208228
<dependency>
209-
<groupId>pl.pragmatists</groupId>
210-
<artifactId>JUnitParams</artifactId>
211-
<version>1.1.1</version>
229+
<!-- SnippetizerTest -->
230+
<groupId>org.jenkins-ci.plugins.workflow</groupId>
231+
<artifactId>workflow-cps</artifactId>
232+
<classifier>tests</classifier>
212233
<scope>test</scope>
213234
</dependency>
235+
236+
<!-- for testing -->
214237
<dependency>
215-
<groupId>io.jenkins</groupId>
216-
<artifactId>configuration-as-code</artifactId>
238+
<groupId>org.jenkins-ci.plugins.workflow</groupId>
239+
<artifactId>workflow-job</artifactId>
217240
<scope>test</scope>
218241
</dependency>
219242
<dependency>
220-
<groupId>io.jenkins.configuration-as-code</groupId>
221-
<artifactId>test-harness</artifactId>
243+
<!-- SemaphoreStep -->
244+
<groupId>org.jenkins-ci.plugins.workflow</groupId>
245+
<artifactId>workflow-support</artifactId>
246+
<classifier>tests</classifier>
222247
<scope>test</scope>
223248
</dependency>
224249
<dependency>
225-
<groupId>org.jenkins-ci.plugins</groupId>
226-
<artifactId>docker-workflow</artifactId>
250+
<!-- DeclarativeGeneratorTester -->
251+
<groupId>org.jenkinsci.plugins</groupId>
252+
<artifactId>pipeline-model-definition</artifactId>
253+
<classifier>tests</classifier>
227254
<scope>test</scope>
228255
</dependency>
229256
<dependency>
230-
<!-- Required to test run src/main/resources/org/csanchez/jenkins/plugins/kubernetes/pipeline/samples/maven.groovy -->
231-
<groupId>org.jenkins-ci.plugins</groupId>
232-
<artifactId>junit</artifactId>
257+
<groupId>org.jenkinsci.plugins</groupId>
258+
<artifactId>pipeline-model-definition</artifactId>
233259
<scope>test</scope>
234260
</dependency>
235261
<dependency>
236-
<groupId>io.fabric8</groupId>
237-
<artifactId>kubernetes-server-mock</artifactId>
238-
<version>6.8.1</version>
262+
<groupId>org.mockito</groupId>
263+
<artifactId>mockito-core</artifactId>
239264
<scope>test</scope>
240265
</dependency>
241266
<dependency>
242-
<groupId>org.awaitility</groupId>
243-
<artifactId>awaitility</artifactId>
244-
<version>4.2.0</version>
267+
<groupId>pl.pragmatists</groupId>
268+
<artifactId>JUnitParams</artifactId>
269+
<version>1.1.1</version>
245270
<scope>test</scope>
246271
</dependency>
247272
</dependencies>
248273

274+
<!-- get every artifact through repo.jenkins-ci.org, which proxies all the artifacts that we need -->
275+
<repositories>
276+
<repository>
277+
<id>repo.jenkins-ci.org</id>
278+
<url>https://repo.jenkins-ci.org/public/</url>
279+
</repository>
280+
</repositories>
249281

250-
<dependencyManagement>
251-
<dependencies>
252-
<dependency>
253-
<groupId>io.jenkins.tools.bom</groupId>
254-
<artifactId>bom-${bom}</artifactId>
255-
<version>${bom.version}</version>
256-
<scope>import</scope>
257-
<type>pom</type>
258-
</dependency>
259-
<dependency>
260-
<groupId>com.squareup.okhttp3</groupId>
261-
<artifactId>mockwebserver</artifactId>
262-
<version>4.9.3</version><!-- should be aligned with the version provided by okhttp-api-plugin -->
263-
</dependency>
264-
</dependencies>
265-
</dependencyManagement>
282+
<pluginRepositories>
283+
<pluginRepository>
284+
<id>repo.jenkins-ci.org</id>
285+
<url>https://repo.jenkins-ci.org/public/</url>
286+
</pluginRepository>
287+
</pluginRepositories>
266288

267289
<build>
268290
<plugins>
@@ -298,21 +320,6 @@
298320
</plugins>
299321
</build>
300322

301-
<!-- get every artifact through repo.jenkins-ci.org, which proxies all the artifacts that we need -->
302-
<repositories>
303-
<repository>
304-
<id>repo.jenkins-ci.org</id>
305-
<url>https://repo.jenkins-ci.org/public/</url>
306-
</repository>
307-
</repositories>
308-
309-
<pluginRepositories>
310-
<pluginRepository>
311-
<id>repo.jenkins-ci.org</id>
312-
<url>https://repo.jenkins-ci.org/public/</url>
313-
</pluginRepository>
314-
</pluginRepositories>
315-
316323
<profiles>
317324
<profile>
318325
<id>docker</id>

0 commit comments

Comments
 (0)