Skip to content

Commit

Permalink
fix: Tried updating the jenkins sonarcloud config for plc4c
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdutz committed Aug 16, 2023
1 parent 2d1466a commit b75a42a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion plc4c/SonarcloudBuildWrapperHack.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cmakeExecutable.renameTo(cmakeRenamedExecutable)
cmakeExecutable.write("#!/bin/bash\n")
cmakeExecutable.append("echo \"Arguments: \$@\"\n")
cmakeExecutable.append("if [[ \"\$1\" == \"--build\" ]]; then\n")
cmakeExecutable.append(" " + cmakeRoot.absolutePath + "/../../build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir " + project.properties["sonar.cfamily.build-wrapper-output"] + " " + cmakeRoot.absolutePath + "/cmakeOrig \"\$@\"\n")
cmakeExecutable.append(" " + cmakeRoot.absolutePath + "/../../../build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir " + project.properties["sonar.cfamily.build-wrapper-output"] + " " + cmakeRoot.absolutePath + "/cmakeOrig \"\$@\"\n")
cmakeExecutable.append("else\n")
cmakeExecutable.append(" " + cmakeRoot.absolutePath + "/cmakeOrig \"\$@\"\n")
cmakeExecutable.append("fi\n")
Expand Down
14 changes: 9 additions & 5 deletions plc4c/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
<!-- When running on jenkins, download the sonar build-wrapper, so we can do a code analysis -->
<profile>
<id>jenkins-build</id>
<!-- This is needed by the groovy hack script -->
<properties>
<cmake.root>${project.build.directory}/dependency/cmake/bin</cmake.root>
</properties>
<build>
<plugins>
<plugin>
Expand All @@ -69,14 +73,14 @@
</execution>
</executions>
</plugin>
<!--plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<executions>
<!- - rename the cmake binary and generate a script that adds the sonar build-wrapper - ->
<!-- rename the cmake binary and generate a script that adds the sonar build-wrapper -->
<execution>
<id>modify-cmake</id>
<phase>process-sources</phase>
<phase>process-test-sources</phase>
<goals>
<goal>execute</goal>
</goals>
Expand All @@ -92,7 +96,7 @@
<version>${groovy.version}</version>
</dependency>
</dependencies>
</plugin-->
</plugin>
</plugins>
</build>
</profile>
Expand Down Expand Up @@ -295,7 +299,7 @@
<!-- Generate the configuration for the test compilation -->
<execution>
<id>cmake-generate-test-compile</id>
<phase>test-compile</phase>
<phase>generate-test-sources</phase>
<goals>
<goal>generate</goal>
</goals>
Expand Down

0 comments on commit b75a42a

Please sign in to comment.