Skip to content

Commit

Permalink
Run the QA on the LTA
Browse files Browse the repository at this point in the history
  • Loading branch information
henryju committed Sep 30, 2024
1 parent ba27ce9 commit e05d3f9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 3 additions & 4 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ qa_task:
memory: 3G
env:
matrix:
- QA_CATEGORY: RELEASE
- QA_CATEGORY: LATEST_RELEASE
- SQ_VERSION: LATEST_RELEASE
- SQ_VERSION: LATEST_RELEASE[9.9]
JAVA_VERSION:
- LATEST_RELEASE
GITHUB_TOKEN: VAULT[development/github/token/licenses-ro token]
Expand All @@ -101,8 +101,7 @@ qa_task:
- source cirrus-env QA
- source set_maven_build_version $BUILD_NUMBER
- cd its
- function get_sq_version() { case $QA_CATEGORY in "RELEASE-7-9") echo "LATEST_RELEASE[7.9]";; "RELEASE") echo "LATEST_RELEASE";; *) echo "$QA_CATEGORY";; esac }
- mvn -B -e verify -Prun-its -Dsonar.runtimeVersion=$(get_sq_version) -DjavaVersion=$JAVA_VERSION
- mvn -B -e verify -Prun-its -Dsonar.runtimeVersion=$SQ_VERSION -DjavaVersion=$JAVA_VERSION
cleanup_before_cache_script:
- cleanup_maven_repository
on_failure:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import org.junit.runner.RunWith;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assume.assumeTrue;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package com.sonar.scanner.lib.it.tools;

import com.sonar.orchestrator.build.BuildResult;
import com.sonar.orchestrator.container.Server;
import com.sonar.scanner.lib.it.ScannerJavaLibraryTestSuite;
import java.io.IOException;
import java.nio.file.Files;
Expand Down Expand Up @@ -75,7 +76,12 @@ private Map<String, String> getSimpleProjectProperties(Path baseDir, String host
analysisProperties.load(Files.newInputStream(propertiesFile));
analysisProperties.setProperty("sonar.projectBaseDir", baseDir.toAbsolutePath().toString());
analysisProperties.setProperty("sonar.host.url", host);
analysisProperties.setProperty("sonar.token", ScannerJavaLibraryTestSuite.ORCHESTRATOR.getDefaultAdminToken());
if (ScannerJavaLibraryTestSuite.ORCHESTRATOR.getServer().version().isGreaterThanOrEquals(10, 0)) {
analysisProperties.setProperty("sonar.token", ScannerJavaLibraryTestSuite.ORCHESTRATOR.getDefaultAdminToken());
} else {
analysisProperties.setProperty("sonar.login", Server.ADMIN_LOGIN);
analysisProperties.setProperty("sonar.password", Server.ADMIN_PASSWORD);
}
analysisProperties.putAll(extraProps);
return (Map) analysisProperties;
}
Expand Down

0 comments on commit e05d3f9

Please sign in to comment.