diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2024-06-24 14:29:12 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2024-06-26 17:32:43 +0200 |
commit | a6b1600237cf100efbcfc0bbcf8ed44fe66a1683 (patch) | |
tree | 64e61f1f72addec2cfaf94b85f88d1d01865096b | |
parent | cf5980dc8db5441a2d51ad399eed841d02240a97 (diff) | |
download | sonar-scanner-cli-a6b1600237cf100efbcfc0bbcf8ed44fe66a1683.tar.gz sonar-scanner-cli-a6b1600237cf100efbcfc0bbcf8ed44fe66a1683.zip |
SCANCLI-147 Add aarch64 distributions for Linux and MacOSX
-rw-r--r-- | .cirrus.yml | 10 | ||||
-rw-r--r-- | it/pom.xml | 20 | ||||
-rw-r--r-- | pom.xml | 129 | ||||
-rw-r--r-- | src/main/assembly/dist-linux-aarch64.xml | 71 | ||||
-rw-r--r-- | src/main/assembly/dist-linux-x64.xml (renamed from src/main/assembly/dist-linux.xml) | 10 | ||||
-rw-r--r-- | src/main/assembly/dist-macosx-aarch64.xml | 68 | ||||
-rw-r--r-- | src/main/assembly/dist-macosx-x64.xml (renamed from src/main/assembly/dist-macosx.xml) | 10 | ||||
-rw-r--r-- | src/main/assembly/dist-windows-x64.xml (renamed from src/main/assembly/dist-windows.xml) | 8 |
8 files changed, 275 insertions, 51 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index d7eabb3..e452439 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -64,7 +64,7 @@ build_task: folder: ${CIRRUS_WORKING_DIR}/.m2/repository script: - source cirrus-env BUILD - - regular_mvn_build_deploy_analyze -Pdist-linux,dist-windows,dist-macosx + - regular_mvn_build_deploy_analyze -Pdist-linux-x64,dist-linux-aarch64,dist-windows-x64,dist-macosx-x64,dist-macosx-aarch64 cleanup_before_cache_script: - cleanup_maven_repository @@ -92,7 +92,7 @@ mend_scan_task: ws_artifacts: path: "whitesource/**/*" -linux_qa_java17_task: +linux_x64_qa_java17_task: depends_on: - build <<: *ONLY_SONARSOURCE_QA @@ -118,7 +118,7 @@ linux_qa_java17_task: cleanup_before_cache_script: - cleanup_maven_repository -win_qa_java17_task: +win_x64_qa_java17_task: depends_on: - build <<: *ONLY_SONARSOURCE_QA @@ -142,8 +142,8 @@ win_qa_java17_task: promote_task: depends_on: - - linux_qa_java17 - - win_qa_java17 + - linux_x64_qa_java17 + - win_x64_qa_java17 <<: *ONLY_SONARSOURCE_QA_EXCEPT_ON_NIGHTLY_CRON eks_container: <<: *EKS_CONTAINER @@ -26,7 +26,7 @@ <!-- following properties must be set in command-line : sonar.runtimeVersion and sonarRunner.version --> <maven.compiler.release>17</maven.compiler.release> - <orchestrator.version>4.1.0.495</orchestrator.version> + <orchestrator.version>5.0.0.2065</orchestrator.version> </properties> <dependencies> @@ -117,33 +117,23 @@ </configuration> </execution> <execution> - <id>get-linux-scanner</id> + <id>get-linux-x64-scanner</id> <phase>initialize</phase> <goals> <goal>get</goal> </goals> <configuration> - <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${env.PROJECT_VERSION}:zip:linux</artifact> + <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${env.PROJECT_VERSION}:zip:linux-x64</artifact> </configuration> </execution> <execution> - <id>get-windows-scanner</id> + <id>get-windows-x64-scanner</id> <phase>initialize</phase> <goals> <goal>get</goal> </goals> <configuration> - <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${env.PROJECT_VERSION}:zip:windows</artifact> - </configuration> - </execution> - <execution> - <id>get-macosx-scanner</id> - <phase>initialize</phase> - <goals> - <goal>get</goal> - </goals> - <configuration> - <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${env.PROJECT_VERSION}:zip:macosx</artifact> + <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${env.PROJECT_VERSION}:zip:windows-x64</artifact> </configuration> </execution> </executions> @@ -59,7 +59,7 @@ <jre.dirname.macosx>jdk-17.0.11+9-jre/Contents/Home</jre.dirname.macosx> <!-- Release: enable publication to Bintray --> - <artifactsToPublish>${project.groupId}:${project.artifactId}:zip,${project.groupId}:${project.artifactId}:zip:linux,${project.groupId}:${project.artifactId}:zip:windows,${project.groupId}:${project.artifactId}:zip:macosx,${project.groupId}:${project.artifactId}:json:cyclonedx</artifactsToPublish> + <artifactsToPublish>${project.groupId}:${project.artifactId}:zip,${project.groupId}:${project.artifactId}:zip:linux-x64,${project.groupId}:${project.artifactId}:zip:linux-aarch64,${project.groupId}:${project.artifactId}:zip:windows-x64,${project.groupId}:${project.artifactId}:zip:macosx-x64,${project.groupId}:${project.artifactId}:zip:macosx-aarch64,${project.groupId}:${project.artifactId}:json:cyclonedx</artifactsToPublish> <maven.compiler.release>17</maven.compiler.release> </properties> @@ -255,7 +255,7 @@ <profiles> <profile> - <id>dist-linux</id> + <id>dist-linux-x64</id> <build> <plugins> <plugin> @@ -263,7 +263,7 @@ <artifactId>download-maven-plugin</artifactId> <executions> <execution> - <id>unpack-linux</id> + <id>unpack-linux-x64</id> <phase>package</phase> <goals> <goal>wget</goal> @@ -271,7 +271,7 @@ <configuration> <url>https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz</url> <unpack>true</unpack> - <outputDirectory>${unpack.dir}/linux</outputDirectory> + <outputDirectory>${unpack.dir}/linux-x64</outputDirectory> <sha256>bcb1b7b8ad68c93093f09b591b7cb17161d39891f7d29d33a586f5a328603707</sha256> </configuration> </execution> @@ -281,7 +281,7 @@ <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> - <id>assemble-linux</id> + <id>assemble-linux-x64</id> <phase>package</phase> <goals> <goal>single</goal> @@ -290,7 +290,55 @@ <finalName>sonar-scanner-${project.version}</finalName> <escapeString>\</escapeString> <descriptors> - <descriptor>src/main/assembly/dist-linux.xml</descriptor> + <descriptor>src/main/assembly/dist-linux-x64.xml</descriptor> + </descriptors> + <filters> + <filter>src/main/assembly/filter-dist.properties</filter> + </filters> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>dist-linux-aarch64</id> + <build> + <plugins> + <plugin> + <groupId>com.googlecode.maven-download-plugin</groupId> + <artifactId>download-maven-plugin</artifactId> + <executions> + <execution> + <id>unpack-linux-aarch64</id> + <phase>package</phase> + <goals> + <goal>wget</goal> + </goals> + <configuration> + <url>https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jre_aarch64_linux_hotspot_17.0.11_9.tar.gz</url> + <unpack>true</unpack> + <outputDirectory>${unpack.dir}/linux-aarch64</outputDirectory> + <sha256>ccfa23c25790475c84df983cc5f729b94c04d9ea9863912deb15c6266782cf16</sha256> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <executions> + <execution> + <id>assemble-linux-aarch64</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <finalName>sonar-scanner-${project.version}</finalName> + <escapeString>\</escapeString> + <descriptors> + <descriptor>src/main/assembly/dist-linux-aarch64.xml</descriptor> </descriptors> <filters> <filter>src/main/assembly/filter-dist.properties</filter> @@ -302,9 +350,8 @@ </plugins> </build> </profile> - <profile> - <id>dist-windows</id> + <id>dist-windows-x64</id> <build> <plugins> <plugin> @@ -312,7 +359,7 @@ <artifactId>download-maven-plugin</artifactId> <executions> <execution> - <id>unpack-windows</id> + <id>unpack-windows-x64</id> <phase>package</phase> <goals> <goal>wget</goal> @@ -320,7 +367,7 @@ <configuration> <url>https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jre_x64_windows_hotspot_17.0.11_9.zip</url> <unpack>true</unpack> - <outputDirectory>${unpack.dir}/windows</outputDirectory> + <outputDirectory>${unpack.dir}/windows-x64</outputDirectory> <sha256>4bafe2e94439c8193fc8c68247cb0dbaf4e80265b903288f63f128304f129bbe</sha256> </configuration> </execution> @@ -330,7 +377,7 @@ <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> - <id>assemble-windows</id> + <id>assemble-windows-x64</id> <phase>package</phase> <goals> <goal>single</goal> @@ -339,7 +386,7 @@ <finalName>sonar-scanner-${project.version}</finalName> <escapeString>\</escapeString> <descriptors> - <descriptor>src/main/assembly/dist-windows.xml</descriptor> + <descriptor>src/main/assembly/dist-windows-x64.xml</descriptor> </descriptors> <filters> <filter>src/main/assembly/filter-dist.properties</filter> @@ -352,7 +399,7 @@ </build> </profile> <profile> - <id>dist-macosx</id> + <id>dist-macosx-x64</id> <build> <plugins> <plugin> @@ -360,7 +407,7 @@ <artifactId>download-maven-plugin</artifactId> <executions> <execution> - <id>unpack-macosx</id> + <id>unpack-macosx-x64</id> <phase>package</phase> <goals> <goal>wget</goal> @@ -368,7 +415,7 @@ <configuration> <url>https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jre_x64_mac_hotspot_17.0.11_9.tar.gz</url> <unpack>true</unpack> - <outputDirectory>${unpack.dir}/macosx</outputDirectory> + <outputDirectory>${unpack.dir}/macosx-x64</outputDirectory> <sha256>232c40bebd6ddbb673862e86e7e6e09bcfe399e5a53c8a6b77bf1ceab8edefd0</sha256> </configuration> </execution> @@ -378,7 +425,55 @@ <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> - <id>assemble-macosx</id> + <id>assemble-macosx-x64</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <finalName>sonar-scanner-${project.version}</finalName> + <escapeString>\</escapeString> + <descriptors> + <descriptor>src/main/assembly/dist-macosx-x64.xml</descriptor> + </descriptors> + <filters> + <filter>src/main/assembly/filter-dist.properties</filter> + </filters> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>dist-macosx-aarch64</id> + <build> + <plugins> + <plugin> + <groupId>com.googlecode.maven-download-plugin</groupId> + <artifactId>download-maven-plugin</artifactId> + <executions> + <execution> + <id>unpack-macosx-aarch64</id> + <phase>package</phase> + <goals> + <goal>wget</goal> + </goals> + <configuration> + <url>https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jre_aarch64_mac_hotspot_17.0.11_9.tar.gz</url> + <unpack>true</unpack> + <outputDirectory>${unpack.dir}/macosx-aarch64</outputDirectory> + <sha256>003d3e0a65a2f0633b8bfed42be133724b490acb323c174c708d3a446d5fc660</sha256> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <executions> + <execution> + <id>assemble-macosx-aarch64</id> <phase>package</phase> <goals> <goal>single</goal> @@ -387,7 +482,7 @@ <finalName>sonar-scanner-${project.version}</finalName> <escapeString>\</escapeString> <descriptors> - <descriptor>src/main/assembly/dist-macosx.xml</descriptor> + <descriptor>src/main/assembly/dist-macosx-aarch64.xml</descriptor> </descriptors> <filters> <filter>src/main/assembly/filter-dist.properties</filter> diff --git a/src/main/assembly/dist-linux-aarch64.xml b/src/main/assembly/dist-linux-aarch64.xml new file mode 100644 index 0000000..3e92aa7 --- /dev/null +++ b/src/main/assembly/dist-linux-aarch64.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<assembly> + <id>linux-aarch64</id> + <formats> + <format>zip</format> + </formats> + <baseDirectory>sonar-scanner-${project.version}-linux-aarch64</baseDirectory> + <fileSets> + + <!-- jre basic, except bin/ --> + <fileSet> + <directory>${unpack.dir}/linux-aarch64/${jre.dirname.linux}</directory> + <outputDirectory>jre</outputDirectory> + <excludes> + <exclude>bin/**</exclude> + <exclude>man/**</exclude> + <exclude>lib/jspawnhelper</exclude> + <exclude>lib/jexec</exclude> + <exclude>plugin/**</exclude> + </excludes> + </fileSet> + + <!-- jre bin/java --> + <fileSet> + <directory>${unpack.dir}/linux-aarch64/${jre.dirname.linux}/bin</directory> + <outputDirectory>jre/bin</outputDirectory> + <includes> + <include>java</include> + </includes> + <fileMode>0755</fileMode> + </fileSet> + + <!-- jre lib executable files --> + <fileSet> + <directory>${unpack.dir}/linux-aarch64/${jre.dirname.linux}/lib</directory> + <outputDirectory>jre/lib</outputDirectory> + <includes> + <include>jspawnhelper</include> + <include>jexec</include> + </includes> + <fileMode>0755</fileMode> + </fileSet> + + <!-- scanner files --> + <fileSet> + <directory>${project.build.directory}</directory> + <outputDirectory>lib</outputDirectory> + <fileMode>0644</fileMode> + <includes> + <include>${scanner.jar}</include> + </includes> + </fileSet> + <fileSet> + <directory>src/main/assembly/conf</directory> + <outputDirectory>conf</outputDirectory> + <fileMode>0644</fileMode> + <lineEnding>unix</lineEnding> + </fileSet> + <fileSet> + <directory>src/main/assembly/bin</directory> + <outputDirectory>bin</outputDirectory> + <fileMode>0755</fileMode> + <lineEnding>unix</lineEnding> + <filtered>true</filtered> + <includes> + <include>sonar-scanner</include> + <include>sonar-scanner-debug</include> + </includes> + </fileSet> + </fileSets> +</assembly> diff --git a/src/main/assembly/dist-linux.xml b/src/main/assembly/dist-linux-x64.xml index d68cfc9..f13e733 100644 --- a/src/main/assembly/dist-linux.xml +++ b/src/main/assembly/dist-linux-x64.xml @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> <assembly> - <id>linux</id> + <id>linux-x64</id> <formats> <format>zip</format> </formats> - <baseDirectory>sonar-scanner-${project.version}-linux</baseDirectory> + <baseDirectory>sonar-scanner-${project.version}-linux-x64</baseDirectory> <fileSets> <!-- jre basic, except bin/ --> <fileSet> - <directory>${unpack.dir}/linux/${jre.dirname.linux}</directory> + <directory>${unpack.dir}/linux-x64/${jre.dirname.linux}</directory> <outputDirectory>jre</outputDirectory> <excludes> <exclude>bin/**</exclude> @@ -22,7 +22,7 @@ <!-- jre bin/java --> <fileSet> - <directory>${unpack.dir}/linux/${jre.dirname.linux}/bin</directory> + <directory>${unpack.dir}/linux-x64/${jre.dirname.linux}/bin</directory> <outputDirectory>jre/bin</outputDirectory> <includes> <include>java</include> @@ -32,7 +32,7 @@ <!-- jre lib executable files --> <fileSet> - <directory>${unpack.dir}/linux/${jre.dirname.linux}/lib</directory> + <directory>${unpack.dir}/linux-x64/${jre.dirname.linux}/lib</directory> <outputDirectory>jre/lib</outputDirectory> <includes> <include>jspawnhelper</include> diff --git a/src/main/assembly/dist-macosx-aarch64.xml b/src/main/assembly/dist-macosx-aarch64.xml new file mode 100644 index 0000000..2329b9b --- /dev/null +++ b/src/main/assembly/dist-macosx-aarch64.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?> +<assembly> + <id>macosx-aarch64</id> + <formats> + <format>zip</format> + </formats> + <baseDirectory>sonar-scanner-${project.version}-macosx-aarch64</baseDirectory> + <fileSets> + + <!-- jre basic, except bin/ and misc --> + <fileSet> + <directory>${unpack.dir}/macosx-aarch64/${jre.dirname.macosx}</directory> + <outputDirectory>jre</outputDirectory> + <excludes> + <exclude>bin/**</exclude> + <exclude>man/**</exclude> + <exclude>lib/jspawnhelper</exclude> + </excludes> + </fileSet> + + <!-- jre bin/java --> + <fileSet> + <directory>${unpack.dir}/macosx-aarch64/${jre.dirname.macosx}/bin</directory> + <outputDirectory>jre/bin</outputDirectory> + <includes> + <include>java</include> + </includes> + <fileMode>0755</fileMode> + </fileSet> + + <!-- jre lib executable files --> + <fileSet> + <directory>${unpack.dir}/macosx-aarch64/${jre.dirname.macosx}/lib</directory> + <outputDirectory>jre/lib</outputDirectory> + <includes> + <include>jspawnhelper</include> + </includes> + <fileMode>0755</fileMode> + </fileSet> + + <!-- scanner files --> + <fileSet> + <directory>${project.build.directory}</directory> + <outputDirectory>lib</outputDirectory> + <fileMode>0644</fileMode> + <includes> + <include>${scanner.jar}</include> + </includes> + </fileSet> + <fileSet> + <directory>src/main/assembly/conf</directory> + <outputDirectory>conf</outputDirectory> + <fileMode>0644</fileMode> + <lineEnding>unix</lineEnding> + </fileSet> + <fileSet> + <directory>src/main/assembly/bin</directory> + <outputDirectory>bin</outputDirectory> + <fileMode>0755</fileMode> + <lineEnding>unix</lineEnding> + <filtered>true</filtered> + <includes> + <include>sonar-scanner</include> + <include>sonar-scanner-debug</include> + </includes> + </fileSet> + </fileSets> +</assembly> diff --git a/src/main/assembly/dist-macosx.xml b/src/main/assembly/dist-macosx-x64.xml index d914152..9429ff6 100644 --- a/src/main/assembly/dist-macosx.xml +++ b/src/main/assembly/dist-macosx-x64.xml @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> <assembly> - <id>macosx</id> + <id>macosx-x64</id> <formats> <format>zip</format> </formats> - <baseDirectory>sonar-scanner-${project.version}-macosx</baseDirectory> + <baseDirectory>sonar-scanner-${project.version}-macosx-x64</baseDirectory> <fileSets> <!-- jre basic, except bin/ and misc --> <fileSet> - <directory>${unpack.dir}/macosx/${jre.dirname.macosx}</directory> + <directory>${unpack.dir}/macosx-x64/${jre.dirname.macosx}</directory> <outputDirectory>jre</outputDirectory> <excludes> <exclude>bin/**</exclude> @@ -20,7 +20,7 @@ <!-- jre bin/java --> <fileSet> - <directory>${unpack.dir}/macosx/${jre.dirname.macosx}/bin</directory> + <directory>${unpack.dir}/macosx-x64/${jre.dirname.macosx}/bin</directory> <outputDirectory>jre/bin</outputDirectory> <includes> <include>java</include> @@ -30,7 +30,7 @@ <!-- jre lib executable files --> <fileSet> - <directory>${unpack.dir}/macosx/${jre.dirname.macosx}/lib</directory> + <directory>${unpack.dir}/macosx-x64/${jre.dirname.macosx}/lib</directory> <outputDirectory>jre/lib</outputDirectory> <includes> <include>jspawnhelper</include> diff --git a/src/main/assembly/dist-windows.xml b/src/main/assembly/dist-windows-x64.xml index f35a152..4f5b01c 100644 --- a/src/main/assembly/dist-windows.xml +++ b/src/main/assembly/dist-windows-x64.xml @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> <assembly> - <id>windows</id> + <id>windows-x64</id> <formats> <format>zip</format> </formats> - <baseDirectory>sonar-scanner-${project.version}-windows</baseDirectory> + <baseDirectory>sonar-scanner-${project.version}-windows-x64</baseDirectory> <fileSets> <!-- jre basic, except bin/ --> <fileSet> - <directory>${unpack.dir}/windows/${jre.dirname.windows}</directory> + <directory>${unpack.dir}/windows-x64/${jre.dirname.windows}</directory> <outputDirectory>jre</outputDirectory> <excludes> <exclude>bin/**</exclude> @@ -20,7 +20,7 @@ <!-- jre bin --> <fileSet> - <directory>${unpack.dir}/windows/${jre.dirname.windows}/bin</directory> + <directory>${unpack.dir}/windows-x64/${jre.dirname.windows}/bin</directory> <outputDirectory>jre/bin</outputDirectory> <fileMode>0755</fileMode> </fileSet> |