]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
SONAR-16183 Add java 17 in CI to sonar-scanner-maven
authorZipeng WU <zipeng.wu@sonarsource.com>
Thu, 24 Mar 2022 13:18:50 +0000 (14:18 +0100)
committerzipeng-wu-sonarsource <68143726+zipeng-wu-sonarsource@users.noreply.github.com>
Mon, 28 Mar 2022 14:13:27 +0000 (16:13 +0200)
.cirrus.yml
it/docker/Dockerfile_17 [new file with mode: 0644]

index fe1b9258ba0719a4263ed50abfb53e25d6d03f9c..fed0cea1bc3984a279be8a7fe894a7ec83a8f763 100644 (file)
@@ -78,6 +78,34 @@ linux_qa_task:
   env:
     matrix:
       - SQ_VERSION: LATEST_RELEASE[7.9]
+      - SQ_VERSION: LATEST_RELEASE[8.9]
+      - SQ_VERSION: DEV
+  maven_cache:
+    folder: ${CIRRUS_WORKING_DIR}/.m2/repository
+  qa_script:
+    - source cirrus-env QA
+    - source set_maven_build_version $BUILD_NUMBER
+    - cd it
+    - mvn -B -e -Dsonar.runtimeVersion="$SQ_VERSION" -Dmaven.test.redirectTestOutputToFile=false verify
+  cleanup_before_cache_script:
+    - cleanup_maven_repository
+
+linux_qa_java17_task:
+  depends_on:
+    - build
+  <<: *ONLY_SONARSOURCE_QA
+  gke_container:
+    dockerfile: it/docker/Dockerfile_17
+    builder_image_project: sonarqube-team
+    builder_image_name: docker-builder-v20200915
+    cluster_name: cirrus-ci-cluster
+    zone: us-central1-a
+    namespace: default
+    cpu: 1
+    memory: 2G
+  env:
+    matrix:
+      - SQ_VERSION: LATEST_RELEASE[8.9]
       - SQ_VERSION: DEV
   maven_cache:
     folder: ${CIRRUS_WORKING_DIR}/.m2/repository
diff --git a/it/docker/Dockerfile_17 b/it/docker/Dockerfile_17
new file mode 100644 (file)
index 0000000..7f17f1e
--- /dev/null
@@ -0,0 +1,21 @@
+#------------------------------------------------------------------------------
+# Installs NodeJS, which is needed for running the Linux ITs.
+#
+# Build from the basedir:
+#   docker build -f it/docker/Dockerfile-qa -t sonar-scanner-cli-qa it/docker
+#
+# Verify the content of the image by running a shell session in it:
+#   docker run -it sonar-scanner-cli-qa bash
+#
+# CirrusCI builds the image when needed. No need to manually upload it to
+# Google Cloud Container Registry. See section "gke_container" of .cirrus.yml
+#------------------------------------------------------------------------------
+
+FROM us.gcr.io/sonarqube-team/base:j17-m3-latest
+
+USER root
+
+RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
+RUN apt-get install -y nodejs
+
+USER sonarsource