Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .buildkite/aarch64_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 0 additions & 25 deletions .buildkite/pull_request_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ steps:
retry:
automatic:
- limit: 3
env:
ENABLE_SONARQUBE: true
command: |
set -euo pipefail
source .buildkite/scripts/common/container-agent.sh
Expand All @@ -110,8 +108,6 @@ steps:
retry:
automatic:
- limit: 3
env:
ENABLE_SONARQUBE: true
command: |
set -euo pipefail

Expand All @@ -122,27 +118,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: "Observability SRE container smoke test"
key: "observability-sre-container-smoke-test"
agents:
Expand Down
1 change: 0 additions & 1 deletion .buildkite/scripts/jdk-matrix-tests/generate-steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
'''

Expand Down
10 changes: 1 addition & 9 deletions ci/unit_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,16 @@ 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"
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
Expand Down
8 changes: 0 additions & 8 deletions logstash-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,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"
}
Expand Down
12 changes: 0 additions & 12 deletions sonar-project.properties

This file was deleted.