Skip to content
Merged
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
7 changes: 5 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
ws_artifacts:
path: "whitesource/**/*"

linux_x64_qa_java17_task:
linux_x64_qa_java11_task:
depends_on:
- build
<<: *ONLY_SONARSOURCE_QA
Expand All @@ -113,6 +113,9 @@
- export PATH=$PATH:/tmp/${nodeName}/bin
- source cirrus-env QA
- source set_maven_build_version $BUILD_NUMBER
- wget -O OpenJDK11U-jre_x64_linux_hotspot_11.0.27_6.tar.gz https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.27%2B6/OpenJDK11U-jre_x64_linux_hotspot_11.0.27_6.tar.gz
- tar xzf OpenJDK11U-jre_x64_linux_hotspot_11.0.27_6.tar.gz -C /tmp
- export JAVA_11_HOME=/tmp/jdk-11.0.27+6-jre
- cd it
- mvn -B -e -Dsonar.runtimeVersion="$SQ_VERSION" -Dmaven.test.redirectTestOutputToFile=false verify
cleanup_before_cache_script:
Expand Down Expand Up @@ -140,9 +143,9 @@
cleanup_before_cache_script:
- cleanup_maven_repository

promote_task:

Check warning on line 146 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L146

task "promote" depends on task "linux_x64_qa_java11", but their only_if conditions are different

Check warning on line 146 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L146

task "promote" depends on task "linux_x64_qa_java11", but their only_if conditions are different

Check warning on line 146 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L146

task "promote" depends on task "linux_x64_qa_java11", but their only_if conditions are different

Check warning on line 146 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L146

task "promote" depends on task "win_x64_qa_java17", but their only_if conditions are different

Check warning on line 146 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L146

task "promote" depends on task "win_x64_qa_java17", but their only_if conditions are different

Check warning on line 146 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L146

task "promote" depends on task "win_x64_qa_java17", but their only_if conditions are different
depends_on:
- linux_x64_qa_java17
- linux_x64_qa_java11
- win_x64_qa_java17
<<: *ONLY_SONARSOURCE_QA_EXCEPT_ON_NIGHTLY_CRON
eks_container:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ public void resetData() {

SonarScanner newScannerWithToken(File baseDir, String token, String... keyValueProperties) {
SonarScanner scannerCli = SonarScanner.create(baseDir, keyValueProperties);
if (System.getenv().containsKey("JAVA_11_HOME")) {
scannerCli.getEnvironmentVariables().put("JAVA_HOME", System.getenv("JAVA_11_HOME"));
}
scannerCli.setScannerVersion(artifactVersion().toString());
if (orchestrator.getServer().version().isGreaterThanOrEquals(10, 0)) {
scannerCli.setProperty("sonar.token", token);
Expand All @@ -115,6 +118,9 @@ SonarScanner newScannerWithToken(File baseDir, String token, String... keyValueP

SonarScanner newScannerWithAdminCredentials(File baseDir, String... keyValueProperties) {
SonarScanner scannerCli = SonarScanner.create(baseDir, keyValueProperties);
if (System.getenv().containsKey("JAVA_11_HOME")) {
scannerCli.getEnvironmentVariables().put("JAVA_HOME", System.getenv("JAVA_11_HOME"));
}
scannerCli.setScannerVersion(artifactVersion().toString());
if (orchestrator.getServer().version().isGreaterThanOrEquals(25, 1)) {
scannerCli.setProperty("sonar.token", orchestrator.getDefaultAdminToken());
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<!-- Release: enable publication to Bintray -->
<artifactsToPublish>${project.groupId}:${project.artifactId}:zip,${project.groupId}:${project.artifactId}:zip:linux-x64,${project.groupId}:${project.artifactId}:zip:linux-aarch64,${project.groupId}:${project.artifactId}:zip:windows-x64,${project.groupId}:${project.artifactId}:zip:macosx-x64,${project.groupId}:${project.artifactId}:zip:macosx-aarch64,${project.groupId}:${project.artifactId}:json:cyclonedx</artifactsToPublish>

<maven.compiler.release>17</maven.compiler.release>
<maven.compiler.release>11</maven.compiler.release>
</properties>

<dependencyManagement>
Expand Down
6 changes: 4 additions & 2 deletions src/test/java/testutils/LogTester.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import org.slf4j.LoggerFactory;
import org.slf4j.event.Level;

import static java.util.stream.Collectors.*;

public class LogTester implements BeforeEachCallback, AfterEachCallback {

private final ConcurrentListAppender<ILoggingEvent> listAppender = new ConcurrentListAppender<>();
Expand Down Expand Up @@ -55,7 +57,7 @@ private static ch.qos.logback.classic.Logger getRootLogger() {
public List<String> logs() {
return listAppender.list.stream().map(e -> (LoggingEvent) e)
.map(LoggingEvent::getFormattedMessage)
.toList();
.collect(toList());
}

/**
Expand All @@ -66,7 +68,7 @@ public List<String> logs(Level level) {
return listAppender.list.stream().map(e -> (LoggingEvent) e)
.filter(e -> e.getLevel().equals(ch.qos.logback.classic.Level.fromLocationAwareLoggerInteger(level.toInt())))
.map(LoggingEvent::getFormattedMessage)
.toList();
.collect(toList());
}

public LogTester clear() {
Expand Down