From e636c305b7af73ad448bd26e693312b889c6bc11 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Tue, 11 Jun 2024 17:29:44 +0530 Subject: [PATCH 01/36] Create sonar-project.properties --- sonar-project.properties | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000000..f5e089f3892 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=spring_boot_jpa1 +sonar.organization=http://localhost:9000 +sonar.host.url=http://localhost:9000 +sonar.login=sqp_1629173d76e38fc9badd97712acab09e4f4998d3 From 2e1740fc39afa559ce6d5218afbd16ffe8f0f27e Mon Sep 17 00:00:00 2001 From: akilShashank Date: Tue, 11 Jun 2024 17:32:34 +0530 Subject: [PATCH 02/36] Create sonar.yaml --- .github/workflows/sonar.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/sonar.yaml diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml new file mode 100644 index 00000000000..b0bc03987bb --- /dev/null +++ b/.github/workflows/sonar.yaml @@ -0,0 +1,30 @@ +name: CI/CD workflow for Maven Build and SonarQube Scan + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: '11' + + - name: Build with Maven + run: mvn clean install + + - name: SonarQube Scan + run: mvn sonar:sonar + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} From 984b72a528c11935c0131bd50e8947915be891f3 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Tue, 11 Jun 2024 17:35:30 +0530 Subject: [PATCH 03/36] Update pom.xml --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index 4862fdc24a0..4379595a389 100644 --- a/pom.xml +++ b/pom.xml @@ -27,6 +27,12 @@ true true + + spring_boot_jpa1 + http://localhost:9000/ + sqp_1629173d76e38fc9badd97712acab09e4f4998d3 + + artifacts From e2c140d1678b26ebf8f3a931625789b2126b1d64 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Tue, 11 Jun 2024 17:36:52 +0530 Subject: [PATCH 04/36] Update pom.xml --- pom.xml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 4379595a389..40da09956ea 100644 --- a/pom.xml +++ b/pom.xml @@ -26,12 +26,10 @@ true true + spring_boot_jpa1 + http://localhost:9000/ + sqp_1629173d76e38fc9badd97712acab09e4f4998d3 - - spring_boot_jpa1 - http://localhost:9000/ - sqp_1629173d76e38fc9badd97712acab09e4f4998d3 - From 0d228ddf993007bf289b46d07664c493ba7dfb45 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Tue, 11 Jun 2024 17:47:36 +0530 Subject: [PATCH 05/36] Update sonar.yaml --- .github/workflows/sonar.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml index b0bc03987bb..ec9daf117bd 100644 --- a/.github/workflows/sonar.yaml +++ b/.github/workflows/sonar.yaml @@ -3,7 +3,7 @@ name: CI/CD workflow for Maven Build and SonarQube Scan on: push: branches: - - master + - main workflow_dispatch: jobs: @@ -14,11 +14,11 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: distribution: 'adopt' - java-version: '11' + java-version: '17' - name: Build with Maven run: mvn clean install From 79661318a92be294a555dd6eeb9fb92c6d1eeaba Mon Sep 17 00:00:00 2001 From: akilShashank Date: Tue, 11 Jun 2024 17:59:23 +0530 Subject: [PATCH 06/36] Update sonar.yaml --- .github/workflows/sonar.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml index ec9daf117bd..6483710f0d1 100644 --- a/.github/workflows/sonar.yaml +++ b/.github/workflows/sonar.yaml @@ -3,7 +3,7 @@ name: CI/CD workflow for Maven Build and SonarQube Scan on: push: branches: - - main + - master workflow_dispatch: jobs: From 5ac43921e8519d046717923b88d0c7e6b568463c Mon Sep 17 00:00:00 2001 From: akilShashank Date: Tue, 11 Jun 2024 18:00:47 +0530 Subject: [PATCH 07/36] Update pom.xml --- pom.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pom.xml b/pom.xml index 40da09956ea..6722613131b 100644 --- a/pom.xml +++ b/pom.xml @@ -26,9 +26,6 @@ true true - spring_boot_jpa1 - http://localhost:9000/ - sqp_1629173d76e38fc9badd97712acab09e4f4998d3 From 35464b995ee9d6e9f570466f9305e9dd534d8ba8 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Tue, 11 Jun 2024 20:55:57 +0530 Subject: [PATCH 08/36] Update sonar.yaml --- .github/workflows/sonar.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml index 6483710f0d1..71057b5ef93 100644 --- a/.github/workflows/sonar.yaml +++ b/.github/workflows/sonar.yaml @@ -3,7 +3,7 @@ name: CI/CD workflow for Maven Build and SonarQube Scan on: push: branches: - - master + - main workflow_dispatch: jobs: @@ -20,6 +20,9 @@ jobs: distribution: 'adopt' java-version: '17' + - name: Verify Java Version + run: java -version + - name: Build with Maven run: mvn clean install From a23bca77afa0948a542075e0ccba78a51d31914a Mon Sep 17 00:00:00 2001 From: akilShashank Date: Tue, 11 Jun 2024 21:22:11 +0530 Subject: [PATCH 09/36] Update sonar.yaml --- .github/workflows/sonar.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml index 71057b5ef93..bcda75684bf 100644 --- a/.github/workflows/sonar.yaml +++ b/.github/workflows/sonar.yaml @@ -20,6 +20,9 @@ jobs: distribution: 'adopt' java-version: '17' + - name: Set JAVA_HOME + run: echo "JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))" >> $GITHUB_ENV + - name: Verify Java Version run: java -version @@ -31,3 +34,11 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + + - name: Archive Surefire Reports + if: always() + uses: actions/upload-artifact@v2 + with: + name: surefire-reports + path: | + **/target/surefire-reports/ From 67653711dcdeb762d057ae84477ad89b63a1e946 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Tue, 11 Jun 2024 23:21:55 +0530 Subject: [PATCH 10/36] Update sonar.yaml --- .github/workflows/sonar.yaml | 66 ++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 37 deletions(-) diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml index bcda75684bf..98cad0ae2a0 100644 --- a/.github/workflows/sonar.yaml +++ b/.github/workflows/sonar.yaml @@ -1,44 +1,36 @@ -name: CI/CD workflow for Maven Build and SonarQube Scan - +name: Build on: push: branches: - - main - workflow_dispatch: - + - master # the name of your main branch + pull_request: + types: [opened, synchronize, reopened] jobs: build: + name: Build runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up JDK 17 - uses: actions/setup-java@v2 - with: - distribution: 'adopt' - java-version: '17' - - - name: Set JAVA_HOME - run: echo "JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))" >> $GITHUB_ENV - - - name: Verify Java Version - run: java -version - - - name: Build with Maven - run: mvn clean install - - - name: SonarQube Scan - run: mvn sonar:sonar - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - - - name: Archive Surefire Reports - if: always() - uses: actions/upload-artifact@v2 - with: - name: surefire-reports - path: | - **/target/surefire-reports/ + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 17 + uses: actions/setup-java@v1 + with: + java-version: 17 + - name: Cache SonarQube packages + uses: actions/cache@v1 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar From 9810b2e0efda9f4f4188bcb62c28f1efd2a8df0c Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 05:53:15 +0530 Subject: [PATCH 11/36] Update pom.xml --- pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pom.xml b/pom.xml index 6722613131b..02cfdd07db5 100644 --- a/pom.xml +++ b/pom.xml @@ -27,6 +27,15 @@ true true + + + opendaylight-snapshots + https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ + + true + + + From 408ca776aa7af8b081bfbae586197b37b4736a2d Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 05:55:52 +0530 Subject: [PATCH 12/36] Update sonar.yaml --- .github/workflows/sonar.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml index 98cad0ae2a0..dc659a902a3 100644 --- a/.github/workflows/sonar.yaml +++ b/.github/workflows/sonar.yaml @@ -33,4 +33,4 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar + run: mvn -U -X -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar From 56ee573b841342a534aba8a247bc0ce3b60fc73e Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 11:10:01 +0530 Subject: [PATCH 13/36] Update sonar.yaml --- .github/workflows/sonar.yaml | 47 ++++++++++-------------------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml index dc659a902a3..ecd16c1bd50 100644 --- a/.github/workflows/sonar.yaml +++ b/.github/workflows/sonar.yaml @@ -1,36 +1,15 @@ -name: Build -on: - push: - branches: - - master # the name of your main branch - pull_request: - types: [opened, synchronize, reopened] -jobs: - build: - name: Build +name: SonarQube Integration + sonarqube: + name: SonarQube Integration runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 17 - uses: actions/setup-java@v1 - with: - java-version: 17 - - name: Cache SonarQube packages - uses: actions/cache@v1 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - name: Cache Maven packages - uses: actions/cache@v1 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Build and analyze - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: mvn -U -X -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar + - uses: actions/checkout@v2 + with: + # Disabling shallow clone is recommended for improving relevancy of reporting + fetch-depth: 0 + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} //Sonar Token generated + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} example URL (https://sq.bswlog.co.in/) From e4df5031b0859289fd33e6484db6bfa101753e2c Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 11:12:13 +0530 Subject: [PATCH 14/36] Update sonar.yaml --- .github/workflows/sonar.yaml | 47 ++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml index ecd16c1bd50..450b0a6e72b 100644 --- a/.github/workflows/sonar.yaml +++ b/.github/workflows/sonar.yaml @@ -1,15 +1,36 @@ -name: SonarQube Integration - sonarqube: - name: SonarQube Integration +name: Build +on: + push: + branches: + - main # the name of your main branch + pull_request: + types: [opened, synchronize, reopened] +jobs: + build: + name: Build runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - # Disabling shallow clone is recommended for improving relevancy of reporting - fetch-depth: 0 - - name: SonarQube Scan - uses: sonarsource/sonarqube-scan-action@master - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} //Sonar Token generated - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} example URL (https://sq.bswlog.co.in/) + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Cache SonarQube packages + uses: actions/cache@v1 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar From 64548d5b2fa757eb7e9a2788cd55e86720cd5521 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 11:13:59 +0530 Subject: [PATCH 15/36] Update sonar.yaml --- .github/workflows/sonar.yaml | 68 +++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 29 deletions(-) diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml index 450b0a6e72b..ab25bafda3f 100644 --- a/.github/workflows/sonar.yaml +++ b/.github/workflows/sonar.yaml @@ -1,36 +1,46 @@ -name: Build +name: CI/CD workflow for Maven Build and SonarQube Scan + on: push: branches: - - main # the name of your main branch - pull_request: - types: [opened, synchronize, reopened] + - main + workflow_dispatch: + jobs: build: - name: Build runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: Cache SonarQube packages - uses: actions/cache@v1 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - name: Cache Maven packages - uses: actions/cache@v1 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Build and analyze - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: '17' + + - name: Set JAVA_HOME + run: echo "JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))" >> $GITHUB_ENV + + - name: Verify Java Version + run: java -version + + - name: Build with Maven + run: mvn clean install + continue-on-error: true + + - name: SonarQube Scan + run: mvn sonar:sonar + continue-on-error: true + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + + - name: Archive Surefire Reports + if: always() + uses: actions/upload-artifact@v2 + with: + name: surefire-reports + path: | + **/target/surefire-reports/ From ce8923557e80922612e26f89d17482f1eaf9352f Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 11:26:28 +0530 Subject: [PATCH 16/36] Delete .github/workflows directory --- .github/workflows/sonar.yaml | 46 ------------------------------------ 1 file changed, 46 deletions(-) delete mode 100644 .github/workflows/sonar.yaml diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml deleted file mode 100644 index ab25bafda3f..00000000000 --- a/.github/workflows/sonar.yaml +++ /dev/null @@ -1,46 +0,0 @@ -name: CI/CD workflow for Maven Build and SonarQube Scan - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up JDK 17 - uses: actions/setup-java@v2 - with: - distribution: 'adopt' - java-version: '17' - - - name: Set JAVA_HOME - run: echo "JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))" >> $GITHUB_ENV - - - name: Verify Java Version - run: java -version - - - name: Build with Maven - run: mvn clean install - continue-on-error: true - - - name: SonarQube Scan - run: mvn sonar:sonar - continue-on-error: true - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - - - name: Archive Surefire Reports - if: always() - uses: actions/upload-artifact@v2 - with: - name: surefire-reports - path: | - **/target/surefire-reports/ From d8416bcb14ad0961128c95d884a006e9abf50fe2 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 11:28:15 +0530 Subject: [PATCH 17/36] Create build.yml --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000000..a5ed3ed01c4 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Build + +on: + push: + branches: + - master + + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Cache SonarQube packages + uses: actions/cache@v1 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=netconf From 8ce20a76f214bf846a68faef919c91b7c4125bfa Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 12:02:12 +0530 Subject: [PATCH 18/36] Update build.yml --- .github/workflows/build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5ed3ed01c4..22190426c12 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,10 +14,11 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - name: Set up JDK 17 + uses: actions/setup-java@v2 with: - java-version: 11 + java-version: 17 + - name: Cache SonarQube packages uses: actions/cache@v1 with: From a38e01acec7611eab5ac080e433e6293daf527e5 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 12:03:18 +0530 Subject: [PATCH 19/36] Update build.yml --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 22190426c12..9d87ef84787 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,6 +17,7 @@ jobs: - name: Set up JDK 17 uses: actions/setup-java@v2 with: + distribution: 'temurin' # You can specify a specific distribution, 'temurin' is commonly used java-version: 17 - name: Cache SonarQube packages From 52127d0eb5ed843151901b13b014f03d11169699 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 12:08:54 +0530 Subject: [PATCH 20/36] Update build.yml --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d87ef84787..561c1647c9c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,6 @@ on: branches: - master - jobs: build: name: Build @@ -19,15 +18,14 @@ jobs: with: distribution: 'temurin' # You can specify a specific distribution, 'temurin' is commonly used java-version: 17 - - name: Cache SonarQube packages - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - name: Cache Maven packages - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} @@ -36,4 +34,6 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=netconf + run: | + mvn clean install -U + mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=netconf From 16e17576bd2252ac0cb28f05051feadba45333db Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 15:37:36 +0530 Subject: [PATCH 21/36] Update build.yml --- .github/workflows/build.yml | 67 ++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 561c1647c9c..aa137dc2762 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,39 +1,46 @@ -name: Build +name: CI/CD workflow for Maven Build and SonarQube Scan on: push: branches: - - master + - main + workflow_dispatch: jobs: build: - name: Build runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 17 - uses: actions/setup-java@v2 - with: - distribution: 'temurin' # You can specify a specific distribution, 'temurin' is commonly used - java-version: 17 - - name: Cache SonarQube packages - uses: actions/cache@v2 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - name: Cache Maven packages - uses: actions/cache@v2 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Build and analyze - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: | - mvn clean install -U - mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=netconf + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: '17' + + - name: Set JAVA_HOME + run: echo "JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))" >> $GITHUB_ENV + + - name: Verify Java Version + run: java -version + + - name: Build with Maven + run: mvn clean install + continue-on-error: true + + - name: SonarQube Scan + run: mvn sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.login=sqp_8da908e1c8cd1fc65a0243098fe39646aa4a0f22 + continue-on-error: true + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + + - name: Archive Surefire Reports + if: always() + uses: actions/upload-artifact@v2 + with: + name: surefire-reports + path: | + **/target/surefire-reports/ From e2f374b65c07d9b4e1791b76e61978c956675d19 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 15:41:53 +0530 Subject: [PATCH 22/36] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aa137dc2762..bfd1143154b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ name: CI/CD workflow for Maven Build and SonarQube Scan on: push: branches: - - main + - master workflow_dispatch: jobs: From bcffef4dc80bc07dcbda7737ddd95339e80d6368 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 15:54:33 +0530 Subject: [PATCH 23/36] Update build.yml --- .github/workflows/build.yml | 65 +++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bfd1143154b..1fd4435dbff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,46 +1,39 @@ -name: CI/CD workflow for Maven Build and SonarQube Scan +name: Build on: push: branches: - master - workflow_dispatch: + jobs: build: + name: Build runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up JDK 17 - uses: actions/setup-java@v2 - with: - distribution: 'adopt' - java-version: '17' - - - name: Set JAVA_HOME - run: echo "JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))" >> $GITHUB_ENV - - - name: Verify Java Version - run: java -version - - - name: Build with Maven - run: mvn clean install - continue-on-error: true - - - name: SonarQube Scan - run: mvn sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.login=sqp_8da908e1c8cd1fc65a0243098fe39646aa4a0f22 - continue-on-error: true - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - - - name: Archive Surefire Reports - if: always() - uses: actions/upload-artifact@v2 - with: - name: surefire-reports - path: | - **/target/surefire-reports/ + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' # You can specify a specific distribution, 'temurin' is commonly used + java-version: 17 + - name: Cache SonarQube packages + uses: actions/cache@v1 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=netconf From 363cc46e3b777dab997ab651897eb4abe2b83ff2 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 16:01:26 +0530 Subject: [PATCH 24/36] Update build.yml --- .github/workflows/build.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1fd4435dbff..7b89c2c8fd0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,6 @@ on: branches: - master - jobs: build: name: Build @@ -14,26 +13,38 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 17 uses: actions/setup-java@v2 with: distribution: 'temurin' # You can specify a specific distribution, 'temurin' is commonly used java-version: 17 + - name: Cache SonarQube packages uses: actions/cache@v1 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages uses: actions/cache@v1 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=netconf + run: | + mvn clean install -U + mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=netconf + + - name: Archive Surefire Reports + if: always() + uses: actions/upload-artifact@v2 + with: + name: surefire-reports + path: **/target/surefire-reports/ From f4971b877efaf4c22d8125b2548883c319241d71 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 16:03:07 +0530 Subject: [PATCH 25/36] Update build.yml --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b89c2c8fd0..958e4556c4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,4 +47,5 @@ jobs: uses: actions/upload-artifact@v2 with: name: surefire-reports - path: **/target/surefire-reports/ + path: + **/target/surefire-reports/ From ee8e56a4c1ad4e68634a297fe1f765e9c30db4d5 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 16:05:48 +0530 Subject: [PATCH 26/36] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 958e4556c4b..7167715e5ad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,5 +47,5 @@ jobs: uses: actions/upload-artifact@v2 with: name: surefire-reports - path: + path: | **/target/surefire-reports/ From 3e93f18c6715d853e15beaf282f7dafb29f9d89e Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 16:14:23 +0530 Subject: [PATCH 27/36] Update build.yml --- .github/workflows/build.yml | 78 ++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 41 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7167715e5ad..3b5a397ba67 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,51 +1,47 @@ -name: Build + +name: CI/CD workflow for Maven Build and SonarQube Scan on: push: branches: - master + workflow_dispatch: jobs: build: - name: Build runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - - name: Set up JDK 17 - uses: actions/setup-java@v2 - with: - distribution: 'temurin' # You can specify a specific distribution, 'temurin' is commonly used - java-version: 17 - - - name: Cache SonarQube packages - uses: actions/cache@v1 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - - name: Cache Maven packages - uses: actions/cache@v1 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - - name: Build and analyze - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: | - mvn clean install -U - mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=netconf - - - name: Archive Surefire Reports - if: always() - uses: actions/upload-artifact@v2 - with: - name: surefire-reports - path: | - **/target/surefire-reports/ + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: '17' + + - name: Set JAVA_HOME + run: echo "JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))" >> $GITHUB_ENV + + - name: Verify Java Version + run: java -version + + - name: Build with Maven + run: mvn clean install + continue-on-error: true + + - name: SonarQube Scan + run: mvn sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.login=sqp_8da908e1c8cd1fc65a0243098fe39646aa4a0f22 + continue-on-error: true + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + + - name: Archive Surefire Reports + if: always() + uses: actions/upload-artifact@v2 + with: + name: surefire-reports + path: | + **/target/surefire-reports/ From 79eec7aa880e45571ed2deabf3b9a1d452cee91d Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 16:40:24 +0530 Subject: [PATCH 28/36] Update pom.xml --- pom.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pom.xml b/pom.xml index 02cfdd07db5..2c75b1b7fad 100644 --- a/pom.xml +++ b/pom.xml @@ -26,6 +26,9 @@ true true + + http://localhost:9000 + From ddbcdb00a36abe747e95c4705f56c5918d134723 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Wed, 12 Jun 2024 16:51:51 +0530 Subject: [PATCH 29/36] Update sonar-project.properties --- sonar-project.properties | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index f5e089f3892..1cfcdeb1d43 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1 @@ -sonar.projectKey=spring_boot_jpa1 -sonar.organization=http://localhost:9000 -sonar.host.url=http://localhost:9000 -sonar.login=sqp_1629173d76e38fc9badd97712acab09e4f4998d3 +sonar.projectKey=netconf From 56fe8df298108a41e8b0aaf3b0e3d85a163a3074 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Thu, 13 Jun 2024 07:01:12 +0530 Subject: [PATCH 30/36] Update build.yml --- .github/workflows/build.yml | 53 +++++++++++-------------------------- 1 file changed, 16 insertions(+), 37 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b5a397ba67..3dad6fa9eb0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,47 +1,26 @@ - -name: CI/CD workflow for Maven Build and SonarQube Scan +name: Build on: push: branches: - master - workflow_dispatch: + jobs: build: + name: Build runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up JDK 17 - uses: actions/setup-java@v2 - with: - distribution: 'adopt' - java-version: '17' - - - name: Set JAVA_HOME - run: echo "JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))" >> $GITHUB_ENV - - - name: Verify Java Version - run: java -version - - - name: Build with Maven - run: mvn clean install - continue-on-error: true - - - name: SonarQube Scan - run: mvn sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.login=sqp_8da908e1c8cd1fc65a0243098fe39646aa4a0f22 - continue-on-error: true - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - - - name: Archive Surefire Reports - if: always() - uses: actions/upload-artifact@v2 - with: - name: surefire-reports - path: | - **/target/surefire-reports/ + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + # If you wish to fail your job when the Quality Gate is red, uncomment the + # following lines. This would typically be used to fail a deployment. + # - uses: sonarsource/sonarqube-quality-gate-action@master + # timeout-minutes: 5 + # env: + # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From f1e8f0fb48642f3e9665a6fbe0a27f2d5bdacfab Mon Sep 17 00:00:00 2001 From: akilShashank Date: Thu, 13 Jun 2024 07:07:55 +0530 Subject: [PATCH 31/36] Update build.yml --- .github/workflows/build.yml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3dad6fa9eb0..05f12e07f91 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,13 +14,25 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - uses: sonarsource/sonarqube-scan-action@master + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Cache SonarQube packages + uses: actions/cache@v1 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - # If you wish to fail your job when the Quality Gate is red, uncomment the - # following lines. This would typically be used to fail a deployment. - # - uses: sonarsource/sonarqube-quality-gate-action@master - # timeout-minutes: 5 - # env: - # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=netconf From f29c85bbef251abe945fce58c318275bb33caaba Mon Sep 17 00:00:00 2001 From: akilShashank Date: Thu, 13 Jun 2024 07:10:14 +0530 Subject: [PATCH 32/36] Update build.yml --- .github/workflows/build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 05f12e07f91..8935e334951 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,10 +14,11 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - name: Set up JDK 17 + uses: actions/setup-java@v2 with: - java-version: 11 + distribution: 'adopt' + java-version: 17 - name: Cache SonarQube packages uses: actions/cache@v1 with: From 00a9655cb4d88d2ba58dab0c6446a04539bcccb2 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Thu, 13 Jun 2024 07:20:20 +0530 Subject: [PATCH 33/36] Update build.yml --- .github/workflows/build.yml | 64 ++++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8935e334951..38c00953d07 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,39 +1,73 @@ -name: Build +name: CI/CD workflow for Maven Build and SonarQube Scan on: push: branches: - master - + workflow_dispatch: jobs: build: name: Build runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 17 uses: actions/setup-java@v2 with: distribution: 'adopt' java-version: 17 + + - name: Set JAVA_HOME + run: echo "JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))" >> $GITHUB_ENV + + - name: Verify Java Version + run: java -version + + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Cache SonarQube packages - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - - name: Cache Maven packages - uses: actions/cache@v1 + + - name: Setup Maven settings + run: | + mkdir -p ~/.m2 + echo ' + + + opendaylight-snapshot + https://nexus.opendaylight.org/content/repositories/opendaylight-snapshot/ + opendaylight-snapshot + + + ' > ~/.m2/settings.xml + + - name: Build with Maven + run: mvn clean install -U --settings ~/.m2/settings.xml + continue-on-error: true + + - name: SonarQube Scan + run: mvn sonar:sonar -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} -Dsonar.login=${{ secrets.SONAR_TOKEN }} --settings ~/.m2/settings.xml + continue-on-error: true + + - name: Archive Surefire Reports + if: always() + uses: actions/upload-artifact@v2 with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Build and analyze - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=netconf + name: surefire-reports + path: | + **/target/surefire-reports/ From 3200812a3b9f9f9e32c7089fd1f6cd0eea584229 Mon Sep 17 00:00:00 2001 From: akilShashank Date: Thu, 13 Jun 2024 09:18:49 +0530 Subject: [PATCH 34/36] Update build.yml --- .github/workflows/build.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 38c00953d07..f9204d65333 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,9 +60,24 @@ jobs: run: mvn clean install -U --settings ~/.m2/settings.xml continue-on-error: true - - name: SonarQube Scan - run: mvn sonar:sonar -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} -Dsonar.login=${{ secrets.SONAR_TOKEN }} --settings ~/.m2/settings.xml - continue-on-error: true + - name: Install SonarQube Scanner + run: | + sudo apt-get update + sudo apt-get install -y unzip + wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-linux.zip + unzip sonar-scanner-cli-4.6.2.2472-linux.zip + export PATH=$PATH:$(pwd)/sonar-scanner-4.6.2.2472-linux/bin + + - name: Run SonarQube Scan + run: | + sonar-scanner \ + -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} \ + -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \ + -Dsonar.login=${{ secrets.SONAR_TOKEN }} \ + env: + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - name: Archive Surefire Reports if: always() From 1f050591485d307cd4be8e7ff908d958f39e7eda Mon Sep 17 00:00:00 2001 From: akilShashank Date: Thu, 13 Jun 2024 09:27:39 +0530 Subject: [PATCH 35/36] Update build.yml --- .github/workflows/build.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9204d65333..fbf8f775e1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,6 +60,14 @@ jobs: run: mvn clean install -U --settings ~/.m2/settings.xml continue-on-error: true + - name: Archive Surefire Reports + if: always() + uses: actions/upload-artifact@v2 + with: + name: surefire-reports + path: | + **/target/surefire-reports/ + - name: Install SonarQube Scanner run: | sudo apt-get update @@ -74,15 +82,9 @@ jobs: -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} \ -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \ -Dsonar.login=${{ secrets.SONAR_TOKEN }} \ + -Dsonar.java.binaries=target env: SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - - name: Archive Surefire Reports - if: always() - uses: actions/upload-artifact@v2 - with: - name: surefire-reports - path: | - **/target/surefire-reports/ + continue-on-error: true From 130d25c697c3736aed1c0597ec6ca2c2157d22c9 Mon Sep 17 00:00:00 2001 From: shashankakil <111838093+shashankakil@users.noreply.github.com> Date: Thu, 13 Jun 2024 12:10:47 +0530 Subject: [PATCH 36/36] Update build.yml --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fbf8f775e1a..87ece17604b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -81,8 +81,7 @@ jobs: sonar-scanner \ -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} \ -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \ - -Dsonar.login=${{ secrets.SONAR_TOKEN }} \ - -Dsonar.java.binaries=target + -Dsonar.login=${{ secrets.SONAR_TOKEN }} env: SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY }}