diff --git a/.github/workflows/testing-pipeline.yml b/.github/workflows/testing-pipeline.yml index bcbbb7706..535a1e19a 100644 --- a/.github/workflows/testing-pipeline.yml +++ b/.github/workflows/testing-pipeline.yml @@ -133,3 +133,33 @@ jobs: uses: tj-actions/changed-files@v41 - name: Check for Version Change run: ci/check_version_bump.py ${{ steps.get_changed_files.outputs.all_changed_and_modified_files }} + + analyze_cuebot: + runs-on: ubuntu-latest + container: aswf/ci-opencue:2024.1 + # container: openjdk:17-jdk-slim + name: Analyze Cuebot + env: + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + # Fetch all Git history, otherwise the current version number will + # not be correctly calculated. + fetch-depth: 0 + + - name: Analyze and send to SonarCloud + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: | + sudo yum -y install java-17-openjdk.x86_64 + chown -R aswfuser:aswfgroup . + su -c "cd cuebot && ./gradlew build" aswfuser + su -c "cd cuebot && ./gradlew jacocoTestReport" aswfuser + su -c "export JAVA_HOME=/usr/lib/jvm/jre-17 && cd cuebot && ./gradlew sonar -Dsonar.login=$(SONAR_TOKEN)" aswfuser + +# ls -l /etc/alternatives/java +# ls /usr/lib/jvm/jre-17 +# cuebot/gradlew dependencies diff --git a/cuebot/build.gradle b/cuebot/build.gradle index 6ce51fb96..b1fe9a360 100644 --- a/cuebot/build.gradle +++ b/cuebot/build.gradle @@ -10,7 +10,7 @@ buildscript { dependencies { classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.8' classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.2.1.RELEASE' - classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1' + classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3' } } @@ -23,8 +23,8 @@ apply plugin: 'com.google.protobuf' apply plugin: 'jacoco' apply plugin: 'org.sonarqube' -sourceCompatibility = 1.8 -targetCompatibility = 1.8 +sourceCompatibility = 11 +targetCompatibility = 11 ext { activemqVersion = '5.12.0' @@ -123,7 +123,7 @@ bootJar { } jacoco { - toolVersion = "0.8.5" + toolVersion = "0.8.12" } jacocoTestReport { @@ -147,10 +147,12 @@ jacocoTestReport { sonarqube { properties { + property "sonar.java.source", "11" property "sonar.host.url", "https://sonarcloud.io" property "sonar.organization", "academysoftwarefoundation" property "sonar.projectKey", "AcademySoftwareFoundation_OpenCue_Cuebot" property "sonar.projectName", "OpenCue Cuebot" + // property "sonar.scanner.skipJreProvisioning", "true" // NOTE: sonar.login must be provided manually, like: // ./gradlew sonarqube -Dsonar.login=