diff --git a/.buildkite/aarch64_pipeline.yml b/.buildkite/aarch64_pipeline.yml index 3ab0e7ce1e3..e99b8383755 100644 --- a/.buildkite/aarch64_pipeline.yml +++ b/.buildkite/aarch64_pipeline.yml @@ -23,9 +23,6 @@ steps: - label: ":java: Java unit tests" key: "java-unit-tests" - env: - # https://github.com/elastic/logstash/pull/15486 for background - ENABLE_SONARQUBE: "false" command: | set -euo pipefail diff --git a/.buildkite/pull_request_pipeline.yml b/.buildkite/pull_request_pipeline.yml index 7f84ad65fce..cef6fc4e62e 100644 --- a/.buildkite/pull_request_pipeline.yml +++ b/.buildkite/pull_request_pipeline.yml @@ -47,8 +47,6 @@ steps: retry: automatic: - limit: 3 - env: - ENABLE_SONARQUBE: true command: | set -euo pipefail source .buildkite/scripts/common/container-agent.sh @@ -58,27 +56,6 @@ steps: - "**/jacocoTestReport.xml" - "**/build/classes/**/*.*" - - label: ":sonarqube: Continuous Code Inspection" - if: | - build.pull_request.id != null || - build.branch == "main" || - build.branch =~ /^[0-9]+\.[0-9]+\$/ - env: - VAULT_SONAR_TOKEN_PATH: "kv/ci-shared/platform-ingest/elastic/logstash/sonar-analyze-token" - agents: - image: "docker.elastic.co/cloud-ci/sonarqube/buildkite-scanner:latest" - command: - - "buildkite-agent artifact download --step ruby-unit-tests coverage/coverage.json ." - - "buildkite-agent artifact download --step java-unit-tests **/jacocoTestReport.xml ." - - "buildkite-agent artifact download --step java-unit-tests **/build/classes/**/*.* ." - - "/scan-source-code.sh" - depends_on: - - "ruby-unit-tests" - - "java-unit-tests" - retry: - manual: - allowed: true - - label: ":lab_coat: Integration Tests / part 1-of-6" key: "integration-tests-part-1-of-6" agents: diff --git a/.buildkite/scripts/jdk-matrix-tests/generate-steps.py b/.buildkite/scripts/jdk-matrix-tests/generate-steps.py index cbb4900354b..f8e50149a38 100644 --- a/.buildkite/scripts/jdk-matrix-tests/generate-steps.py +++ b/.buildkite/scripts/jdk-matrix-tests/generate-steps.py @@ -229,7 +229,6 @@ def java_unit_test(self) -> JobRetValues: step_name_human = "Java Unit Test" step_key = f"{self.group_key}-java-unit-test" test_command = ''' -export ENABLE_SONARQUBE="false" ci/unit_tests.sh java ''' diff --git a/ci/unit_tests.sh b/ci/unit_tests.sh index 82a670b071e..d7a760d693e 100755 --- a/ci/unit_tests.sh +++ b/ci/unit_tests.sh @@ -10,8 +10,6 @@ export GRADLE_OPTS="-Xmx4g -Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false export SPEC_OPTS="--order rand --format documentation" export CI=true export TEST_DEBUG=true -# don't rely on bash booleans for truth checks, since some CI platforms don't have a way to specify env vars as boolean -export ENABLE_SONARQUBE=${ENABLE_SONARQUBE:-"true"} if [ -n "$BUILD_JAVA_HOME" ]; then GRADLE_OPTS="$GRADLE_OPTS -Dorg.gradle.java.home=$BUILD_JAVA_HOME" @@ -19,15 +17,9 @@ fi SELECTED_TEST_SUITE=$1 -SONAR_ARGS=() -if [[ $(echo $ENABLE_SONARQUBE | tr '[:lower:]' '[:upper:]') == "TRUE" ]]; then - SONAR_ARGS=("jacocoTestReport") - export COVERAGE=true -fi - if [[ $SELECTED_TEST_SUITE == $"java" ]]; then echo "Running Java Tests" - ./gradlew javaTests "${SONAR_ARGS[@]}" --console=plain --warning-mode all + ./gradlew javaTests --console=plain --warning-mode all elif [[ $SELECTED_TEST_SUITE == $"ruby" ]]; then echo "Running Ruby unit tests" ./gradlew rubyTests --console=plain --warning-mode all diff --git a/logstash-core/build.gradle b/logstash-core/build.gradle index 0aa6e8bb1e3..68d466683ed 100644 --- a/logstash-core/build.gradle +++ b/logstash-core/build.gradle @@ -29,22 +29,14 @@ buildscript { plugins { id "jacoco" - id "org.sonarqube" version "4.3.0.3225" } apply plugin: 'jacoco' -apply plugin: "org.sonarqube" repositories { mavenCentral() } -sonarqube { - properties { - property 'sonar.coverage.jacoco.xmlReportPaths', "${buildDir}/reports/jacoco/test/jacocoTestReport.xml" - } -} - jacoco { toolVersion = "0.8.9" } diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index d95e9fcc176..00000000000 --- a/sonar-project.properties +++ /dev/null @@ -1,12 +0,0 @@ -sonar.projectKey=elastic_logstash_AYm_nEbQaV3I-igkX1q9 -sonar.host.url=https://sonar.elastic.dev - -sonar.exclusions=vendor/**, gradle/**, rakelib/**, logstash-core-plugin-api/**, licenses/**, qa/**, **/spec/** -sonar.tests=logstash-core/src/test, x-pack/src/test, buildSrc/src/test - -# Ruby -sonar.ruby.coverage.reportPaths=coverage/coverage.json - -# Java -sonar.coverage.jacoco.xmlReportPaths=**/jacocoTestReport.xml -sonar.java.binaries=**/build/classes \ No newline at end of file