From 008be39eebf25fd94ffabec7c813c8a6fcff8cbf Mon Sep 17 00:00:00 2001 From: Diego Tavares Date: Thu, 20 Jun 2024 13:55:07 -0700 Subject: [PATCH 01/16] Attempt to fix sonarcuebe pipeline --- .github/workflows/testing-pipeline.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/testing-pipeline.yml b/.github/workflows/testing-pipeline.yml index 15967a4a9..56b27054f 100644 --- a/.github/workflows/testing-pipeline.yml +++ b/.github/workflows/testing-pipeline.yml @@ -115,3 +115,23 @@ jobs: uses: tj-actions/changed-files@v35 - 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:2020 + name: Analyze Cuebot + 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: | + chown -R aswfuser:aswfgroup . + su -c "cd cuebot && ./gradlew jacocoTestReport sonarqube -Dsonar.login=${SONAR_TOKEN}" aswfuser From 0a8c3889213c016ecbb3a098c2ccc9373eb52434 Mon Sep 17 00:00:00 2001 From: Diego Tavares Date: Wed, 18 Sep 2024 08:44:17 -0700 Subject: [PATCH 02/16] Attempt to fix pipeline --- .github/workflows/testing-pipeline.yml | 9 +++++++-- cuebot/build.gradle | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/testing-pipeline.yml b/.github/workflows/testing-pipeline.yml index ae2bf1abf..014ba8406 100644 --- a/.github/workflows/testing-pipeline.yml +++ b/.github/workflows/testing-pipeline.yml @@ -136,8 +136,10 @@ jobs: analyze_cuebot: runs-on: ubuntu-latest - container: aswf/ci-opencue:2020 + container: aswf/ci-opencue:2024.1 name: Analyze Cuebot + env: + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true steps: - name: Checkout uses: actions/checkout@v3 @@ -152,4 +154,7 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | chown -R aswfuser:aswfgroup . - su -c "cd cuebot && ./gradlew jacocoTestReport sonarqube -Dsonar.login=${SONAR_TOKEN}" aswfuser + echo JAVA_HOME=$JAVA_HOME + cuebot/gradlew --version + su -c "cd cuebot && ./gradlew jacocoTestReport sonarqube -Dsonar.login=$(SONAR_TOKEN)" aswfuser + diff --git a/cuebot/build.gradle b/cuebot/build.gradle index 6ce51fb96..884eb708c 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:2.6.2' } } @@ -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' From 39d96fab425976e93100f2f5ae6e2993e3621a1e Mon Sep 17 00:00:00 2001 From: Diego Tavares Date: Wed, 18 Sep 2024 13:39:18 -0700 Subject: [PATCH 03/16] Upgrade java and sonarqube-gradle-plugin --- .github/workflows/testing-pipeline.yml | 5 ++--- cuebot/build.gradle | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/testing-pipeline.yml b/.github/workflows/testing-pipeline.yml index 014ba8406..d7b4f482d 100644 --- a/.github/workflows/testing-pipeline.yml +++ b/.github/workflows/testing-pipeline.yml @@ -154,7 +154,6 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | chown -R aswfuser:aswfgroup . - echo JAVA_HOME=$JAVA_HOME - cuebot/gradlew --version - su -c "cd cuebot && ./gradlew jacocoTestReport sonarqube -Dsonar.login=$(SONAR_TOKEN)" aswfuser + cuebot/gradlew dependencies + su -c "cd cuebot && ./gradlew jacocoTestReport sonar -Dsonar.login=$(SONAR_TOKEN)" aswfuser diff --git a/cuebot/build.gradle b/cuebot/build.gradle index 884eb708c..f78220228 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.6.2' + classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.8' } } @@ -123,7 +123,7 @@ bootJar { } jacoco { - toolVersion = "0.8.5" + toolVersion = "0.8.12" } jacocoTestReport { @@ -147,6 +147,7 @@ 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" From 502d183a1f4427cb1d4e959d5c67c47c4ef0e711 Mon Sep 17 00:00:00 2001 From: Brian Cipriano Date: Fri, 20 Sep 2024 11:36:19 -0400 Subject: [PATCH 04/16] echo JAVA_HOME --- .github/workflows/testing-pipeline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/testing-pipeline.yml b/.github/workflows/testing-pipeline.yml index d7b4f482d..bbe4b4a39 100644 --- a/.github/workflows/testing-pipeline.yml +++ b/.github/workflows/testing-pipeline.yml @@ -155,5 +155,7 @@ jobs: run: | chown -R aswfuser:aswfgroup . cuebot/gradlew dependencies + echo "${USER} JAVA_HOME: ${JAVA_HOME}" + su -c "echo aswfuser JAVA_HOME ${JAVA_HOME}" aswfuser su -c "cd cuebot && ./gradlew jacocoTestReport sonar -Dsonar.login=$(SONAR_TOKEN)" aswfuser From b7e3571ead7ddf40a3f2559fda7eee2d5c8e849f Mon Sep 17 00:00:00 2001 From: Brian Cipriano Date: Fri, 20 Sep 2024 11:42:28 -0400 Subject: [PATCH 05/16] java -version --- .github/workflows/testing-pipeline.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing-pipeline.yml b/.github/workflows/testing-pipeline.yml index bbe4b4a39..8cc7feb7d 100644 --- a/.github/workflows/testing-pipeline.yml +++ b/.github/workflows/testing-pipeline.yml @@ -155,7 +155,12 @@ jobs: run: | chown -R aswfuser:aswfgroup . cuebot/gradlew dependencies - echo "${USER} JAVA_HOME: ${JAVA_HOME}" - su -c "echo aswfuser JAVA_HOME ${JAVA_HOME}" aswfuser + echo "" + echo "main JAVA_HOME: \"${JAVA_HOME}\"" + java -version + echo "" + su -c "echo aswfuser JAVA_HOME: \"${JAVA_HOME}\"" aswfuser + su -c "java -version" aswfuser + echo "" su -c "cd cuebot && ./gradlew jacocoTestReport sonar -Dsonar.login=$(SONAR_TOKEN)" aswfuser From b5650c88c17216396634e89000deb6ea37ca9ca6 Mon Sep 17 00:00:00 2001 From: Brian Cipriano Date: Fri, 20 Sep 2024 11:53:15 -0400 Subject: [PATCH 06/16] downgrade plugin --- cuebot/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuebot/build.gradle b/cuebot/build.gradle index f78220228..bab36bc56 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.8' + classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1' } } From 4b986c2ea83b6814d33794f458ae786a3ea2c75c Mon Sep 17 00:00:00 2001 From: Brian Cipriano Date: Fri, 20 Sep 2024 11:58:06 -0400 Subject: [PATCH 07/16] upgrade plugin --- cuebot/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuebot/build.gradle b/cuebot/build.gradle index bab36bc56..826ec510c 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:5.1.0' } } From c3d34ea2953f6f3c80da918eb9cf6c9f746d0b51 Mon Sep 17 00:00:00 2001 From: Brian Cipriano Date: Fri, 20 Sep 2024 12:01:20 -0400 Subject: [PATCH 08/16] upgrade plugin --- cuebot/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuebot/build.gradle b/cuebot/build.gradle index 826ec510c..efa5006f3 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:5.1.0' + classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:5.1.0.4882' } } From 1baec688e1140b048bd2da0fbcd1dad87754429e Mon Sep 17 00:00:00 2001 From: Brian Cipriano Date: Fri, 20 Sep 2024 12:05:15 -0400 Subject: [PATCH 09/16] upgrade plugin --- cuebot/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuebot/build.gradle b/cuebot/build.gradle index efa5006f3..cc4477428 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:5.1.0.4882' + classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3' } } From b56d7a7ab892d0a6021ce31af5f8b885e855e236 Mon Sep 17 00:00:00 2001 From: Brian Cipriano Date: Fri, 20 Sep 2024 12:10:58 -0400 Subject: [PATCH 10/16] skipJreProvisioning --- cuebot/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/cuebot/build.gradle b/cuebot/build.gradle index cc4477428..2265c43f5 100644 --- a/cuebot/build.gradle +++ b/cuebot/build.gradle @@ -152,6 +152,7 @@ sonarqube { 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= From bc8ac802a35db03b6860cf3892e1e4ad13ec08b0 Mon Sep 17 00:00:00 2001 From: Brian Cipriano Date: Fri, 20 Sep 2024 12:17:10 -0400 Subject: [PATCH 11/16] openjdk docker --- .github/workflows/testing-pipeline.yml | 13 +++---------- cuebot/build.gradle | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/testing-pipeline.yml b/.github/workflows/testing-pipeline.yml index 8cc7feb7d..1f9141652 100644 --- a/.github/workflows/testing-pipeline.yml +++ b/.github/workflows/testing-pipeline.yml @@ -136,7 +136,8 @@ jobs: analyze_cuebot: runs-on: ubuntu-latest - container: aswf/ci-opencue:2024.1 + # container: aswf/ci-opencue:2024.1 + container: openjdk:17-jdk-slim name: Analyze Cuebot env: ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true @@ -153,14 +154,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | - chown -R aswfuser:aswfgroup . cuebot/gradlew dependencies - echo "" - echo "main JAVA_HOME: \"${JAVA_HOME}\"" - java -version - echo "" - su -c "echo aswfuser JAVA_HOME: \"${JAVA_HOME}\"" aswfuser - su -c "java -version" aswfuser - echo "" - su -c "cd cuebot && ./gradlew jacocoTestReport sonar -Dsonar.login=$(SONAR_TOKEN)" aswfuser + cd cuebot && ./gradlew jacocoTestReport sonar -Dsonar.login=$(SONAR_TOKEN) diff --git a/cuebot/build.gradle b/cuebot/build.gradle index 2265c43f5..b1fe9a360 100644 --- a/cuebot/build.gradle +++ b/cuebot/build.gradle @@ -152,7 +152,7 @@ sonarqube { property "sonar.organization", "academysoftwarefoundation" property "sonar.projectKey", "AcademySoftwareFoundation_OpenCue_Cuebot" property "sonar.projectName", "OpenCue Cuebot" - property "sonar.scanner.skipJreProvisioning", "true" + // property "sonar.scanner.skipJreProvisioning", "true" // NOTE: sonar.login must be provided manually, like: // ./gradlew sonarqube -Dsonar.login= From 11d5e4d0029b44d8307368be5006f9a3e0c81916 Mon Sep 17 00:00:00 2001 From: Brian Cipriano Date: Fri, 20 Sep 2024 12:54:12 -0400 Subject: [PATCH 12/16] install java 17 --- .github/workflows/testing-pipeline.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing-pipeline.yml b/.github/workflows/testing-pipeline.yml index 1f9141652..26fca815e 100644 --- a/.github/workflows/testing-pipeline.yml +++ b/.github/workflows/testing-pipeline.yml @@ -136,8 +136,8 @@ jobs: analyze_cuebot: runs-on: ubuntu-latest - # container: aswf/ci-opencue:2024.1 - container: openjdk:17-jdk-slim + container: aswf/ci-opencue:2024.1 + # container: openjdk:17-jdk-slim name: Analyze Cuebot env: ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true @@ -154,6 +154,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | - cuebot/gradlew dependencies - cd cuebot && ./gradlew jacocoTestReport sonar -Dsonar.login=$(SONAR_TOKEN) + echo $(which java) + sudo yum -y install java-17-openjdk.x86_64 + echo $(which java) + chown -R aswfuser:aswfgroup . + su -c "cd cuebot && ./gradlew build" aswfuser + su -c "cd cuebot && ./gradlew jacocoTestReport sonar -Dsonar.login=$(SONAR_TOKEN)" aswfuser +# cuebot/gradlew dependencies From 7ad30c10b80ad5a5488c84304e174d1bdcdd0345 Mon Sep 17 00:00:00 2001 From: Brian Cipriano Date: Fri, 20 Sep 2024 13:00:01 -0400 Subject: [PATCH 13/16] find jvm --- .github/workflows/testing-pipeline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/testing-pipeline.yml b/.github/workflows/testing-pipeline.yml index 26fca815e..3308af32f 100644 --- a/.github/workflows/testing-pipeline.yml +++ b/.github/workflows/testing-pipeline.yml @@ -157,6 +157,8 @@ jobs: echo $(which java) sudo yum -y install java-17-openjdk.x86_64 echo $(which java) + ls -l /usr/bin/java + ls /usr/lib/jvm chown -R aswfuser:aswfgroup . su -c "cd cuebot && ./gradlew build" aswfuser su -c "cd cuebot && ./gradlew jacocoTestReport sonar -Dsonar.login=$(SONAR_TOKEN)" aswfuser From 691a807cc4af6aa2c9f2e9acbbf2f2407a65cf72 Mon Sep 17 00:00:00 2001 From: Brian Cipriano Date: Fri, 20 Sep 2024 13:03:59 -0400 Subject: [PATCH 14/16] tweak ls --- .github/workflows/testing-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing-pipeline.yml b/.github/workflows/testing-pipeline.yml index 3308af32f..a2dadc23d 100644 --- a/.github/workflows/testing-pipeline.yml +++ b/.github/workflows/testing-pipeline.yml @@ -157,8 +157,8 @@ jobs: echo $(which java) sudo yum -y install java-17-openjdk.x86_64 echo $(which java) - ls -l /usr/bin/java - ls /usr/lib/jvm + ls -l /etc/alternatives/java + ls /usr/lib/jvm/jre-17 chown -R aswfuser:aswfgroup . su -c "cd cuebot && ./gradlew build" aswfuser su -c "cd cuebot && ./gradlew jacocoTestReport sonar -Dsonar.login=$(SONAR_TOKEN)" aswfuser From 7be765ffeb8c168c654a27711493ef11e4ed37e7 Mon Sep 17 00:00:00 2001 From: Brian Cipriano Date: Fri, 20 Sep 2024 13:09:31 -0400 Subject: [PATCH 15/16] Set JAVA_HOME --- .github/workflows/testing-pipeline.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/testing-pipeline.yml b/.github/workflows/testing-pipeline.yml index a2dadc23d..d871a08e6 100644 --- a/.github/workflows/testing-pipeline.yml +++ b/.github/workflows/testing-pipeline.yml @@ -154,13 +154,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | - echo $(which java) sudo yum -y install java-17-openjdk.x86_64 - echo $(which java) - ls -l /etc/alternatives/java - ls /usr/lib/jvm/jre-17 chown -R aswfuser:aswfgroup . su -c "cd cuebot && ./gradlew build" aswfuser - su -c "cd cuebot && ./gradlew jacocoTestReport sonar -Dsonar.login=$(SONAR_TOKEN)" aswfuser + su -c "export JAVA_HOME=/usr/lib/jvm/jre-17 && cd cuebot && ./gradlew jacocoTestReport sonar -Dsonar.login=$(SONAR_TOKEN)" aswfuser +# ls -l /etc/alternatives/java +# ls /usr/lib/jvm/jre-17 # cuebot/gradlew dependencies From 06f84609d41ee13e626e5efe1499b38c25dffffe Mon Sep 17 00:00:00 2001 From: Brian Cipriano Date: Fri, 20 Sep 2024 13:16:08 -0400 Subject: [PATCH 16/16] split test report step --- .github/workflows/testing-pipeline.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testing-pipeline.yml b/.github/workflows/testing-pipeline.yml index d871a08e6..535a1e19a 100644 --- a/.github/workflows/testing-pipeline.yml +++ b/.github/workflows/testing-pipeline.yml @@ -157,7 +157,8 @@ jobs: sudo yum -y install java-17-openjdk.x86_64 chown -R aswfuser:aswfgroup . su -c "cd cuebot && ./gradlew build" aswfuser - su -c "export JAVA_HOME=/usr/lib/jvm/jre-17 && cd cuebot && ./gradlew jacocoTestReport sonar -Dsonar.login=$(SONAR_TOKEN)" 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