Skip to content

Commit 1ee556b

Browse files
authored
Require 2.452.4 and fix build (#327)
1 parent 7c4cd3f commit 1ee556b

File tree

4 files changed

+34
-15
lines changed

4 files changed

+34
-15
lines changed

Jenkinsfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
buildPlugin(useContainerAgent: false, configurations: [
2-
[platform: 'linux', jdk: 21],
3-
[platform: 'maven-17-windows', jdk: 17] // TODO Docker-based tests fail when using Docker on Windows. The maven-windows agents do not have Docker installed so tests that require Docker are skipped.
1+
/*
2+
See the documentation for more options:
3+
https://github.com/jenkins-infra/pipeline-library/
4+
*/
5+
buildPlugin(
6+
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
7+
useContainerAgent: false, // Set to `false` if you need to use Docker for containerized tests
8+
configurations: [
9+
[platform: 'linux', jdk: 21],
10+
[platform: 'maven-17-windows', jdk: 17], // TODO Docker-based tests fail when using Docker on Windows. The maven-windows agents do not have Docker installed so tests that require Docker are skipped.
411
])

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<parent>
55
<groupId>org.jenkins-ci.plugins</groupId>
66
<artifactId>plugin</artifactId>
7-
<version>4.86</version>
8-
<relativePath />
7+
<version>4.88</version>
8+
<relativePath/>
99
</parent>
1010
<artifactId>docker-workflow</artifactId>
1111
<version>${changelist}</version>
@@ -31,8 +31,8 @@
3131
<properties>
3232
<changelist>999999-SNAPSHOT</changelist>
3333
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
34-
<jenkins.baseline>2.361</jenkins.baseline>
35-
<jenkins.version>${jenkins.baseline}.4</jenkins.version>
34+
<jenkins.baseline>2.452</jenkins.baseline>
35+
<jenkins.version>${jenkins.baseline}.4</jenkins.version>
3636
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
3737
</properties>
3838
<repositories>
@@ -52,7 +52,7 @@
5252
<dependency>
5353
<groupId>io.jenkins.tools.bom</groupId>
5454
<artifactId>bom-${jenkins.baseline}.x</artifactId>
55-
<version>2102.v854b_fec19c92</version>
55+
<version>3893.v213a_42768d35</version>
5656
<scope>import</scope>
5757
<type>pom</type>
5858
</dependency>

src/test/java/org/jenkinsci/plugins/docker/workflow/declarative/DeclarativeDockerUtilsTest.java

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
3434
import hudson.ExtensionList;
3535
import hudson.Functions;
36+
import hudson.model.Descriptor.FormException;
3637
import hudson.model.Slave;
3738
import org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint;
3839
import org.jenkinsci.plugins.docker.workflow.DockerTestUtil;
@@ -51,12 +52,23 @@
5152
* And related configurations like {@link DockerPropertiesProvider}.
5253
*/
5354
public class DeclarativeDockerUtilsTest extends AbstractModelDefTest {
54-
private static final UsernamePasswordCredentialsImpl globalCred = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL,
55-
"globalCreds", "sample", "bobby", "s3cr37");
56-
private static final UsernamePasswordCredentialsImpl folderCred = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL,
57-
"folderCreds", "other sample", "andrew", "s0mething");
58-
private static final UsernamePasswordCredentialsImpl grandParentCred = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL,
59-
"grandParentCreds", "yet another sample", "leopold", "idunno");
55+
56+
private static final UsernamePasswordCredentialsImpl globalCred;
57+
private static final UsernamePasswordCredentialsImpl folderCred;
58+
private static final UsernamePasswordCredentialsImpl grandParentCred;
59+
60+
static {
61+
try {
62+
globalCred = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL,
63+
"globalCreds", "sample", "bobby", "s3cr37");
64+
folderCred = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL,
65+
"folderCreds", "other sample", "andrew", "s0mething");
66+
grandParentCred = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL,
67+
"grandParentCreds", "yet another sample", "leopold", "idunno");
68+
} catch (FormException e) {
69+
throw new RuntimeException(e);
70+
}
71+
}
6072

6173
@BeforeClass
6274
public static void setup() throws Exception {

src/test/resources/org/jenkinsci/plugins/docker/workflow/agent-with-docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM jenkins/agent:4.10-5-jdk11
1+
FROM jenkins/agent:3206.3208.v409508a_675ff-1-jdk17
22
USER root
33
RUN cat /etc/os-release
44
# TODO https://github.com/moby/moby/issues/15717 alas; no curl or wget in image

0 commit comments

Comments
 (0)