Skip to content

Commit

Permalink
MMF-3636 POC
Browse files Browse the repository at this point in the history
  • Loading branch information
ericg138 committed Mar 26, 2024
1 parent f3710e2 commit d583361
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .cirrus.yml
Expand Up @@ -14,7 +14,7 @@ env:
ARTIFACTORY_DEPLOY_PASSWORD: VAULT[development/artifactory/token/SonarSource-sonar-scanner-cli-qa-deployer access_token]
ARTIFACTORY_DEPLOY_REPO: sonarsource-public-qa
ARTIFACTORY_PROMOTE_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-promoter access_token]

BURGR_URL: VAULT[development/kv/data/burgr data.url]
BURGR_USERNAME: VAULT[development/kv/data/burgr data.cirrus_username]
BURGR_PASSWORD: VAULT[development/kv/data/burgr data.cirrus_password]
Expand Down Expand Up @@ -76,7 +76,7 @@ linux_qa_java17_task:
env:
matrix:
- SQ_VERSION: LATEST_RELEASE[9.9]
- SQ_VERSION: DEV
# - SQ_VERSION: DEV
maven_cache:
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
qa_script:
Expand All @@ -102,7 +102,7 @@ win_qa_java17_task:
CIRRUS_SHELL: bash
matrix:
- SQ_VERSION: LATEST_RELEASE[9.9]
- SQ_VERSION: DEV
# - SQ_VERSION: DEV
maven_cache:
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
qa_script:
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Expand Up @@ -64,9 +64,9 @@

<dependencies>
<dependency>
<groupId>org.sonarsource.scanner.api</groupId>
<artifactId>sonar-scanner-api</artifactId>
<version>2.16.3.1081</version>
<groupId>org.sonarsource.scanner.commons</groupId>
<artifactId>sonar-scanner-commons</artifactId>
<version>2.17.0.1457</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
Expand Down Expand Up @@ -179,8 +179,8 @@
<configuration>
<rules>
<requireFilesSize>
<minsize>560000</minsize>
<maxsize>600000</maxsize>
<minsize>1300000</minsize>
<maxsize>1370000</maxsize>
<files>
<file>${project.build.directory}/sonar-scanner-${project.version}.zip</file>
</files>
Expand Down
9 changes: 4 additions & 5 deletions src/test/java/org/sonarsource/scanner/cli/ConfTest.java
Expand Up @@ -19,6 +19,7 @@
*/
package org.sonarsource.scanner.cli;

import com.google.gson.JsonObject;
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
Expand All @@ -33,7 +34,6 @@
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonarsource.scanner.api.internal.shaded.minimaljson.Json;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assume.assumeTrue;
Expand Down Expand Up @@ -327,11 +327,10 @@ public void should_load_project_settings_using_env() throws Exception {
Properties properties = conf.properties();
assertThat(properties.get("sonar.prop")).isEqualTo("default");

String jsonString = Json.object()
.add("project.settings", home.resolve("conf/sq-project.properties").toAbsolutePath().toString())
.toString();
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("project.settings", home.resolve("conf/sq-project.properties").toAbsolutePath().toString());

env.put("SONARQUBE_SCANNER_PARAMS", jsonString);
env.put("SONARQUBE_SCANNER_PARAMS", jsonObject.toString());

properties = conf.properties();
assertThat(properties.get("sonar.prop")).isEqualTo("expected");
Expand Down

0 comments on commit d583361

Please sign in to comment.