Skip to content

Commit

Permalink
More adjustments backing off newer code. (#1094)
Browse files Browse the repository at this point in the history
* [pom] More adjustments and drop sonar plugin back to version 4.

* [test] Bring up to date

* [pom] Few more adjustments

* [pom] More adjustments and drop back to see if we can get tests to work
  • Loading branch information
hazendaz authored Nov 28, 2024
1 parent 5a1c268 commit 6a2340c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
include:
# 9.9 LTS
- SONAR_SERVER_VERSION: 9.9.7.96285
SONAR_PLUGIN_API_VERSION: 9.17.0.587
SONAR_PLUGIN_API_VERSION: 9.14.0.375
SONAR_SERVER_JAVA_VERSION: 17
# 10.x
- SONAR_SERVER_VERSION: 10.7.0.96327
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
env:
# previous LTS version
SONAR_SERVER_VERSION: 9.9.7.96285
SONAR_PLUGIN_API_VERSION: 9.17.0.587
SONAR_PLUGIN_API_VERSION: 9.14.0.375
SONAR_TOKEN: $SONAR_TOKEN
steps:
- name: Decide the ref to check out
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<surefire.version>3.5.2</surefire.version>
<failsafe.version>3.5.2</failsafe.version>
<sonar.server.version>9.9.7.96285</sonar.server.version>
<sonar-plugin-api.version>9.17.0.587</sonar-plugin-api.version>
<sonar-plugin-api.version>9.14.0.375</sonar-plugin-api.version>
<sonar-java.version>8.6.0.37351</sonar-java.version>

<sonar-orchestrator.version>5.0.0.2065</sonar-orchestrator.version>
Expand All @@ -76,7 +76,7 @@
<dependency>
<groupId>org.sonarsource.api.plugin</groupId>
<artifactId>sonar-plugin-api</artifactId>
<version>9.17.0.587</version>
<version>9.14.0.375</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
2 changes: 1 addition & 1 deletion src/smoke-test/smoke-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function run_smoke_test() {
echo SonarQube has been launched.

count=0
until mvn compile org.eclipse.jetty.ee8:jetty-ee8-jspc-maven-plugin:12.0.15:jspc org.sonarsource.scanner.maven:sonar-maven-plugin:5.0.0.4389:sonar -B -Dmaven.test.skip -Dsonar.profile="FindBugs + FB-Contrib" -Dsonar.host.url=http://sonarqube:9000 -Dsonar.login=admin -Dsonar.password=admin; do
until mvn compile org.eclipse.jetty.ee8:jetty-ee8-jspc-maven-plugin:12.0.15:jspc org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.41219:sonar -B -Dmaven.test.skip -Dsonar.profile="FindBugs + FB-Contrib" -Dsonar.host.url=http://sonarqube:9000 -Dsonar.login=admin -Dsonar.password=admin; do
count=$[ $count + 1 ]
if [ $count -ge 5 ]; then
echo Sonar fails to scan 5 times!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class FindbugsTestSuite {

OrchestratorExtensionBuilder orchestratorBuilder = OrchestratorExtension.builderEnv()
// Build the SonarQube server with an older version of the plugin
.addPlugin(MavenLocation.of("com.github.spotbugs", "sonar-findbugs-plugin", "4.0.6"))
.addPlugin(MavenLocation.of("com.github.spotbugs", "sonar-findbugs-plugin", "4.3.0"))
.keepBundledPlugins()
// Since SQ 9.8 permissions for 'Anyone' group has been limited for new instances
.useDefaultAdminCredentialsForBuilds(true)
Expand All @@ -72,7 +72,7 @@ public class FindbugsTestSuite {
File pluginTargetFile = new File(ORCHESTRATOR.getServer().getHome(), "extensions/plugins/sonar-findbugs-plugin.jar");
try (OutputStream out = new FileOutputStream(pluginTargetFile)) {
// Delete the old version of the plugin
Files.delete(ORCHESTRATOR.getServer().getHome().toPath().resolve("extensions/plugins/sonar-findbugs-plugin-4.0.6.jar"));
Files.delete(ORCHESTRATOR.getServer().getHome().toPath().resolve("extensions/plugins/sonar-findbugs-plugin-4.3.0.jar"));
Files.copy(FileSystems.getDefault().getPath("target", "sonar-findbugs-plugin.jar"), out);
} catch (IOException e) {
throw new RuntimeException(e);
Expand Down

0 comments on commit 6a2340c

Please sign in to comment.