Skip to content

Commit e05d3f9

Browse files
committed
Run the QA on the LTA
1 parent ba27ce9 commit e05d3f9

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

.cirrus.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ qa_task:
9090
memory: 3G
9191
env:
9292
matrix:
93-
- QA_CATEGORY: RELEASE
94-
- QA_CATEGORY: LATEST_RELEASE
93+
- SQ_VERSION: LATEST_RELEASE
94+
- SQ_VERSION: LATEST_RELEASE[9.9]
9595
JAVA_VERSION:
9696
- LATEST_RELEASE
9797
GITHUB_TOKEN: VAULT[development/github/token/licenses-ro token]
@@ -101,8 +101,7 @@ qa_task:
101101
- source cirrus-env QA
102102
- source set_maven_build_version $BUILD_NUMBER
103103
- cd its
104-
- function get_sq_version() { case $QA_CATEGORY in "RELEASE-7-9") echo "LATEST_RELEASE[7.9]";; "RELEASE") echo "LATEST_RELEASE";; *) echo "$QA_CATEGORY";; esac }
105-
- mvn -B -e verify -Prun-its -Dsonar.runtimeVersion=$(get_sq_version) -DjavaVersion=$JAVA_VERSION
104+
- mvn -B -e verify -Prun-its -Dsonar.runtimeVersion=$SQ_VERSION -DjavaVersion=$JAVA_VERSION
106105
cleanup_before_cache_script:
107106
- cleanup_maven_repository
108107
on_failure:

its/it-tests/src/test/java/com/sonar/scanner/lib/it/SSLTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import org.junit.runner.RunWith;
5454

5555
import static org.assertj.core.api.Assertions.assertThat;
56+
import static org.junit.Assume.assumeTrue;
5657

5758
@RunWith(DataProviderRunner.class)
5859
public class SSLTest {
@@ -237,6 +238,7 @@ private static Path project(String projectName) {
237238
@Test
238239
@UseDataProvider("variousClientTrustStores")
239240
public void simple_analysis_with_server_certificate(String clientTrustStore, String keyStorePassword, boolean useJavaSslProperties) throws Exception {
241+
assumeTrue("New SSL properties have been introduced in 10.6", ORCHESTRATOR.getServer().version().isGreaterThanOrEquals(10,6) || useJavaSslProperties);
240242
startSSLTransparentReverseProxy(false);
241243
SimpleScanner scanner = new SimpleScanner();
242244

its/it-tests/src/test/java/com/sonar/scanner/lib/it/tools/SimpleScanner.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
package com.sonar.scanner.lib.it.tools;
2121

2222
import com.sonar.orchestrator.build.BuildResult;
23+
import com.sonar.orchestrator.container.Server;
2324
import com.sonar.scanner.lib.it.ScannerJavaLibraryTestSuite;
2425
import java.io.IOException;
2526
import java.nio.file.Files;
@@ -75,7 +76,12 @@ private Map<String, String> getSimpleProjectProperties(Path baseDir, String host
7576
analysisProperties.load(Files.newInputStream(propertiesFile));
7677
analysisProperties.setProperty("sonar.projectBaseDir", baseDir.toAbsolutePath().toString());
7778
analysisProperties.setProperty("sonar.host.url", host);
78-
analysisProperties.setProperty("sonar.token", ScannerJavaLibraryTestSuite.ORCHESTRATOR.getDefaultAdminToken());
79+
if (ScannerJavaLibraryTestSuite.ORCHESTRATOR.getServer().version().isGreaterThanOrEquals(10, 0)) {
80+
analysisProperties.setProperty("sonar.token", ScannerJavaLibraryTestSuite.ORCHESTRATOR.getDefaultAdminToken());
81+
} else {
82+
analysisProperties.setProperty("sonar.login", Server.ADMIN_LOGIN);
83+
analysisProperties.setProperty("sonar.password", Server.ADMIN_PASSWORD);
84+
}
7985
analysisProperties.putAll(extraProps);
8086
return (Map) analysisProperties;
8187
}

0 commit comments

Comments
 (0)