From a6b1600237cf100efbcfc0bbcf8ed44fe66a1683 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Mon, 24 Jun 2024 14:29:12 +0200 Subject: [PATCH] SCANCLI-147 Add aarch64 distributions for Linux and MacOSX --- .cirrus.yml | 10 +- it/pom.xml | 20 +-- pom.xml | 129 +++++++++++++++--- src/main/assembly/dist-linux-aarch64.xml | 71 ++++++++++ .../{dist-linux.xml => dist-linux-x64.xml} | 10 +- src/main/assembly/dist-macosx-aarch64.xml | 68 +++++++++ .../{dist-macosx.xml => dist-macosx-x64.xml} | 10 +- ...{dist-windows.xml => dist-windows-x64.xml} | 8 +- 8 files changed, 275 insertions(+), 51 deletions(-) create mode 100644 src/main/assembly/dist-linux-aarch64.xml rename src/main/assembly/{dist-linux.xml => dist-linux-x64.xml} (84%) create mode 100644 src/main/assembly/dist-macosx-aarch64.xml rename src/main/assembly/{dist-macosx.xml => dist-macosx-x64.xml} (83%) rename src/main/assembly/{dist-windows.xml => dist-windows-x64.xml} (83%) 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 diff --git a/it/pom.xml b/it/pom.xml index cfb9282..f067669 100644 --- a/it/pom.xml +++ b/it/pom.xml @@ -26,7 +26,7 @@ 17 - 4.1.0.495 + 5.0.0.2065 @@ -117,33 +117,23 @@ - get-linux-scanner + get-linux-x64-scanner initialize get - org.sonarsource.scanner.cli:sonar-scanner-cli:${env.PROJECT_VERSION}:zip:linux + org.sonarsource.scanner.cli:sonar-scanner-cli:${env.PROJECT_VERSION}:zip:linux-x64 - get-windows-scanner + get-windows-x64-scanner initialize get - org.sonarsource.scanner.cli:sonar-scanner-cli:${env.PROJECT_VERSION}:zip:windows - - - - get-macosx-scanner - initialize - - get - - - org.sonarsource.scanner.cli:sonar-scanner-cli:${env.PROJECT_VERSION}:zip:macosx + org.sonarsource.scanner.cli:sonar-scanner-cli:${env.PROJECT_VERSION}:zip:windows-x64 diff --git a/pom.xml b/pom.xml index d80a75d..22b471e 100644 --- a/pom.xml +++ b/pom.xml @@ -59,7 +59,7 @@ jdk-17.0.11+9-jre/Contents/Home - ${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 + ${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 17 @@ -255,7 +255,7 @@ - dist-linux + dist-linux-x64 @@ -263,7 +263,7 @@ download-maven-plugin - unpack-linux + unpack-linux-x64 package wget @@ -271,7 +271,7 @@ https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz true - ${unpack.dir}/linux + ${unpack.dir}/linux-x64 bcb1b7b8ad68c93093f09b591b7cb17161d39891f7d29d33a586f5a328603707 @@ -281,7 +281,7 @@ maven-assembly-plugin - assemble-linux + assemble-linux-x64 package single @@ -290,7 +290,55 @@ sonar-scanner-${project.version} \ - src/main/assembly/dist-linux.xml + src/main/assembly/dist-linux-x64.xml + + + src/main/assembly/filter-dist.properties + + + + + + + + + + dist-linux-aarch64 + + + + com.googlecode.maven-download-plugin + download-maven-plugin + + + unpack-linux-aarch64 + package + + wget + + + https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jre_aarch64_linux_hotspot_17.0.11_9.tar.gz + true + ${unpack.dir}/linux-aarch64 + ccfa23c25790475c84df983cc5f729b94c04d9ea9863912deb15c6266782cf16 + + + + + + maven-assembly-plugin + + + assemble-linux-aarch64 + package + + single + + + sonar-scanner-${project.version} + \ + + src/main/assembly/dist-linux-aarch64.xml src/main/assembly/filter-dist.properties @@ -302,9 +350,8 @@ - - dist-windows + dist-windows-x64 @@ -312,7 +359,7 @@ download-maven-plugin - unpack-windows + unpack-windows-x64 package wget @@ -320,7 +367,7 @@ https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jre_x64_windows_hotspot_17.0.11_9.zip true - ${unpack.dir}/windows + ${unpack.dir}/windows-x64 4bafe2e94439c8193fc8c68247cb0dbaf4e80265b903288f63f128304f129bbe @@ -330,7 +377,7 @@ maven-assembly-plugin - assemble-windows + assemble-windows-x64 package single @@ -339,7 +386,7 @@ sonar-scanner-${project.version} \ - src/main/assembly/dist-windows.xml + src/main/assembly/dist-windows-x64.xml src/main/assembly/filter-dist.properties @@ -352,7 +399,7 @@ - dist-macosx + dist-macosx-x64 @@ -360,7 +407,7 @@ download-maven-plugin - unpack-macosx + unpack-macosx-x64 package wget @@ -368,7 +415,7 @@ https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jre_x64_mac_hotspot_17.0.11_9.tar.gz true - ${unpack.dir}/macosx + ${unpack.dir}/macosx-x64 232c40bebd6ddbb673862e86e7e6e09bcfe399e5a53c8a6b77bf1ceab8edefd0 @@ -378,7 +425,55 @@ maven-assembly-plugin - assemble-macosx + assemble-macosx-x64 + package + + single + + + sonar-scanner-${project.version} + \ + + src/main/assembly/dist-macosx-x64.xml + + + src/main/assembly/filter-dist.properties + + + + + + + + + + dist-macosx-aarch64 + + + + com.googlecode.maven-download-plugin + download-maven-plugin + + + unpack-macosx-aarch64 + package + + wget + + + https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jre_aarch64_mac_hotspot_17.0.11_9.tar.gz + true + ${unpack.dir}/macosx-aarch64 + 003d3e0a65a2f0633b8bfed42be133724b490acb323c174c708d3a446d5fc660 + + + + + + maven-assembly-plugin + + + assemble-macosx-aarch64 package single @@ -387,7 +482,7 @@ sonar-scanner-${project.version} \ - src/main/assembly/dist-macosx.xml + src/main/assembly/dist-macosx-aarch64.xml src/main/assembly/filter-dist.properties 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 @@ + + + linux-aarch64 + + zip + + sonar-scanner-${project.version}-linux-aarch64 + + + + + ${unpack.dir}/linux-aarch64/${jre.dirname.linux} + jre + + bin/** + man/** + lib/jspawnhelper + lib/jexec + plugin/** + + + + + + ${unpack.dir}/linux-aarch64/${jre.dirname.linux}/bin + jre/bin + + java + + 0755 + + + + + ${unpack.dir}/linux-aarch64/${jre.dirname.linux}/lib + jre/lib + + jspawnhelper + jexec + + 0755 + + + + + ${project.build.directory} + lib + 0644 + + ${scanner.jar} + + + + src/main/assembly/conf + conf + 0644 + unix + + + src/main/assembly/bin + bin + 0755 + unix + true + + sonar-scanner + sonar-scanner-debug + + + + diff --git a/src/main/assembly/dist-linux.xml b/src/main/assembly/dist-linux-x64.xml similarity index 84% rename from src/main/assembly/dist-linux.xml rename to 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 @@ - linux + linux-x64 zip - sonar-scanner-${project.version}-linux + sonar-scanner-${project.version}-linux-x64 - ${unpack.dir}/linux/${jre.dirname.linux} + ${unpack.dir}/linux-x64/${jre.dirname.linux} jre bin/** @@ -22,7 +22,7 @@ - ${unpack.dir}/linux/${jre.dirname.linux}/bin + ${unpack.dir}/linux-x64/${jre.dirname.linux}/bin jre/bin java @@ -32,7 +32,7 @@ - ${unpack.dir}/linux/${jre.dirname.linux}/lib + ${unpack.dir}/linux-x64/${jre.dirname.linux}/lib jre/lib jspawnhelper 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 @@ + + + macosx-aarch64 + + zip + + sonar-scanner-${project.version}-macosx-aarch64 + + + + + ${unpack.dir}/macosx-aarch64/${jre.dirname.macosx} + jre + + bin/** + man/** + lib/jspawnhelper + + + + + + ${unpack.dir}/macosx-aarch64/${jre.dirname.macosx}/bin + jre/bin + + java + + 0755 + + + + + ${unpack.dir}/macosx-aarch64/${jre.dirname.macosx}/lib + jre/lib + + jspawnhelper + + 0755 + + + + + ${project.build.directory} + lib + 0644 + + ${scanner.jar} + + + + src/main/assembly/conf + conf + 0644 + unix + + + src/main/assembly/bin + bin + 0755 + unix + true + + sonar-scanner + sonar-scanner-debug + + + + diff --git a/src/main/assembly/dist-macosx.xml b/src/main/assembly/dist-macosx-x64.xml similarity index 83% rename from src/main/assembly/dist-macosx.xml rename to 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 @@ - macosx + macosx-x64 zip - sonar-scanner-${project.version}-macosx + sonar-scanner-${project.version}-macosx-x64 - ${unpack.dir}/macosx/${jre.dirname.macosx} + ${unpack.dir}/macosx-x64/${jre.dirname.macosx} jre bin/** @@ -20,7 +20,7 @@ - ${unpack.dir}/macosx/${jre.dirname.macosx}/bin + ${unpack.dir}/macosx-x64/${jre.dirname.macosx}/bin jre/bin java @@ -30,7 +30,7 @@ - ${unpack.dir}/macosx/${jre.dirname.macosx}/lib + ${unpack.dir}/macosx-x64/${jre.dirname.macosx}/lib jre/lib jspawnhelper diff --git a/src/main/assembly/dist-windows.xml b/src/main/assembly/dist-windows-x64.xml similarity index 83% rename from src/main/assembly/dist-windows.xml rename to 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 @@ - windows + windows-x64 zip - sonar-scanner-${project.version}-windows + sonar-scanner-${project.version}-windows-x64 - ${unpack.dir}/windows/${jre.dirname.windows} + ${unpack.dir}/windows-x64/${jre.dirname.windows} jre bin/** @@ -20,7 +20,7 @@ - ${unpack.dir}/windows/${jre.dirname.windows}/bin + ${unpack.dir}/windows-x64/${jre.dirname.windows}/bin jre/bin 0755 -- 2.39.5