Skip to content

Commit fbf0c9d

Browse files
Merge pull request #142 from raul-arabaolaza/BUMP_BASELINE
Bump jenkins baseline to 2.319.3, parent pom and needed dependencies
2 parents be2f9e6 + d749e1b commit fbf0c9d

File tree

5 files changed

+60
-14
lines changed

5 files changed

+60
-14
lines changed

Jenkinsfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
buildPlugin(configurations: [
2-
[platform: 'linux', jdk: '8'],
32
[platform: 'linux', jdk: '11'],
43
[platform: 'windows', jdk: '11'],
54
])
@@ -8,12 +7,11 @@ node('docker') {
87
stage('checkout') {
98
checkout scm
109
}
11-
stage('docker-pull') {
12-
sh 'docker pull fbelzunc/ad-build-container-with-docker-fixtures'
13-
}
10+
1411
stage('maven') {
15-
sh 'docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install -P \'!noIT\''
12+
sh 'docker build -t fixture src/test/resources/fixture && docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fixture clean install -P \'!noIT\''
1613
}
14+
1715
stage('surefire-report') {
1816
junit 'target/surefire-reports/*.xml'
1917
}

pom.xml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.jenkins-ci.plugins</groupId>
66
<artifactId>plugin</artifactId>
7-
<version>4.19</version>
7+
<version>4.50</version>
88
<relativePath />
99
</parent>
1010

@@ -37,11 +37,21 @@
3737
<revision>2.28</revision>
3838
<changelist>-SNAPSHOT</changelist>
3939
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
40-
<jenkins.version>2.235.5</jenkins.version>
41-
<java.level>8</java.level>
42-
<configuration-as-code.version>1.35</configuration-as-code.version>
40+
<jenkins.version>2.332.4</jenkins.version>
4341
</properties>
4442

43+
<dependencyManagement>
44+
<dependencies>
45+
<dependency>
46+
<groupId>io.jenkins.tools.bom</groupId>
47+
<artifactId>bom-2.332.x</artifactId>
48+
<version>1678.vc1feb_6a_3c0f1</version>
49+
<scope>import</scope>
50+
<type>pom</type>
51+
</dependency>
52+
</dependencies>
53+
</dependencyManagement>
54+
4555
<dependencies>
4656
<dependency>
4757
<groupId>org.jvnet.com4j.typelibs</groupId>
@@ -73,12 +83,10 @@
7383
<dependency>
7484
<groupId>org.jenkins-ci.plugins</groupId>
7585
<artifactId>mailer</artifactId>
76-
<version>1.5</version>
7786
</dependency>
7887
<dependency>
7988
<groupId>io.jenkins.plugins</groupId>
8089
<artifactId>caffeine-api</artifactId>
81-
<version>2.9.0-17.v79e9099a51e3</version>
8290
</dependency>
8391
<dependency>
8492
<groupId>com.github.spotbugs</groupId>
@@ -102,7 +110,7 @@
102110
<dependency>
103111
<groupId>org.jenkins-ci.test</groupId>
104112
<artifactId>docker-fixtures</artifactId>
105-
<version>1.10</version>
113+
<version>166.v912b_95083ffe</version>
106114
<scope>test</scope>
107115
<exclusions>
108116
<exclusion>
@@ -123,13 +131,11 @@
123131
<dependency>
124132
<groupId>io.jenkins</groupId>
125133
<artifactId>configuration-as-code</artifactId>
126-
<version>${configuration-as-code.version}</version>
127134
<optional>true</optional>
128135
</dependency>
129136
<dependency>
130137
<groupId>io.jenkins.configuration-as-code</groupId>
131138
<artifactId>test-harness</artifactId>
132-
<version>${configuration-as-code.version}</version>
133139
<scope>test</scope>
134140
</dependency>
135141
<dependency>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM docker:stable-dind
2+
# Keys were rotated in the edge repos, so we need to do this now
3+
RUN apk add -X https://dl-cdn.alpinelinux.org/alpine/v3.16/main -u alpine-keys --allow-untrusted
4+
# Workaround for https://github.com/AdoptOpenJDK/openjdk-docker/issues/75
5+
RUN apk add --no-cache fontconfig ttf-dejavu openjdk11 bash tini bind-tools
6+
RUN apk add aufs-util --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing
7+
RUN apk add maven --repository http://dl-cdn.alpinelinux.org/alpine/edge/community
8+
# Workaround for https://github.com/AdoptOpenJDK/openjdk-docker/issues/75
9+
RUN ln -s /usr/lib/libfontconfig.so.1 /usr/lib/libfontconfig.so && \
10+
ln -s /lib/libuuid.so.1 /usr/lib/libuuid.so.1 && \
11+
ln -s /lib/libc.musl-x86_64.so.1 /usr/lib/libc.musl-x86_64.so.1
12+
ENV LD_LIBRARY_PATH /usr/lib
13+
14+
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk/
15+
#ENV DOCKER_STORAGE_DRIVER=overlay2
16+
ENV DOCKER_HOST=unix:///var/tmp/docker.sock
17+
18+
COPY daemon.json /etc/docker/daemon.json
19+
COPY custom-dockerd-entrypoint.sh /usr/local/bin/custom-dockerd-entrypoint.sh
20+
21+
WORKDIR /project
22+
23+
ENTRYPOINT ["/sbin/tini","-g","--","bash","/usr/local/bin/custom-dockerd-entrypoint.sh"]
24+
25+
CMD ["clean","install"]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
set -ex -o pipefail
3+
DOCKER_OPTS="--config-file=/etc/docker/daemon.json"
4+
$(which dind) dockerd ${DOCKER_OPTS} >/dev/stdout 2>&1 &
5+
sleep 1
6+
mvn -B -Djenkins.test.timeout=1200 "$@"
7+
exit 0
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"hosts": [
3+
"unix:///var/tmp/docker.sock",
4+
"tcp://0.0.0.0:2375"
5+
],
6+
"insecure-registries": [
7+
"docker-registry:5000"
8+
],
9+
"bip":"192.168.0.1/24"
10+
}

0 commit comments

Comments
 (0)