Skip to content

Commit 90818b1

Browse files
committed
Merge branch 'release/4.1.1'
2 parents fc3d076 + 8518170 commit 90818b1

File tree

6 files changed

+16
-10
lines changed

6 files changed

+16
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
## [Unreleased]
1010

11+
## [4.1.1](https://github.com/cloudogu/ces-build-lib/releases/tag/4.1.1) - 2025-03-11
12+
### Fixed
13+
- [#143] Fix IllegalAccessError when using `GradleWrapperInDocker(..)`
14+
1115
## [4.1.0](https://github.com/cloudogu/ces-build-lib/releases/tag/4.1.0) - 2025-02-19
1216
### Added
1317
- Add checkChangelog function to make sure your changelog has been updated on an open PR

Jenkinsfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ node('docker') {
5050
def sonarQube = cesBuildLib.SonarQube.new(this, 'ces-sonar')
5151
sonarQube.updateAnalysisResultOfPullRequestsToGitHub('sonarqube-gh-token')
5252

53-
sonarQube.analyzeWith(mvn)
53+
// SonarQube >= v25.01 needs JDK 17
54+
def mvnWithJdk17 = cesBuildLib.MavenWrapperInDocker.new(this, 'eclipse-temurin:17.0.14_7-jdk-alpine')
55+
mvnWithJdk17.useLocalRepoFromJenkins = true
56+
sonarQube.analyzeWith(mvnWithJdk17)
5457

5558
if (!sonarQube.waitForQualityGateWebhookToBeCalled()) {
5659
unstable("Pipeline unstable due to SonarQube quality gate failure")

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<groupId>com.cloudogu.ces</groupId>
2020
<artifactId>ces-build-lib</artifactId>
2121
<name>ces-build-lib</name>
22-
<version>4.1.0</version>
22+
<version>4.1.1</version>
2323

2424

2525
<properties>

src/com/cloudogu/ces/cesbuildlib/GradleInDockerBase.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ abstract class GradleInDockerBase extends Gradle {
66

77
/** Setting this to {@code true} allows the Gradle build to access the docker host, i.e. to start other containers.*/
88
boolean enableDockerHost = false
9-
String credentialsId = null
9+
private String credentialsId = null
1010

1111
Docker docker
1212

13-
GradleInDockerBase(script) {
13+
GradleInDockerBase(script, String credentialsId = null) {
1414
super(script)
15+
this.credentialsId = credentialsId
1516
this.docker = new Docker(script)
1617
}
1718

src/com/cloudogu/ces/cesbuildlib/GradleWrapperInDocker.groovy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ class GradleWrapperInDocker extends GradleInDockerBase {
99
private String imageId
1010

1111
GradleWrapperInDocker(script, String imageId, String credentialsId = null) {
12-
super(script)
12+
super(script, credentialsId)
1313
this.imageId = imageId
14-
this.credentialsId = credentialsId
1514
}
1615

1716
@Override

test/com/cloudogu/ces/cesbuildlib/GradleInDockerBaseTest.groovy

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ class GradleInDockerBaseTest {
2525

2626
@Test
2727
void inDockerWithRegistry() {
28-
def gradle = new GradleInDockerBaseForTest(scriptMock)
28+
def gradle = new GradleInDockerBaseForTest(scriptMock, 'myCreds')
2929
gradle.docker = docker.mock
3030
scriptMock.expectedDefaultShRetValue = ''
31-
gradle.credentialsId = 'myCreds'
3231
boolean closureCalled = false
3332

3433
gradle.inDocker(IMAGE_ID, {
@@ -62,8 +61,8 @@ class GradleInDockerBaseTest {
6261

6362
class GradleInDockerBaseForTest extends GradleInDockerBase {
6463

65-
GradleInDockerBaseForTest(script) {
66-
super(script)
64+
GradleInDockerBaseForTest(script, String credentialsId = null) {
65+
super(script, credentialsId)
6766
}
6867

6968
def call(Closure closure, boolean printStdOut) {

0 commit comments

Comments
 (0)