From d3d715a47a612ce68c078b41851a489898f4f916 Mon Sep 17 00:00:00 2001 From: Edwin Date: Mon, 15 May 2023 16:08:56 +0530 Subject: [PATCH 1/5] adding github action for sonar and added sonar property file --- .github/workflows/sonar.yml | 29 +++++++++++++++++++++++++++++ sonar-project.properties | 1 + 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/sonar.yml create mode 100644 sonar-project.properties diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml new file mode 100644 index 0000000..d30cb81 --- /dev/null +++ b/.github/workflows/sonar.yml @@ -0,0 +1,29 @@ +name: Sonar_Analysis +on: + push: + branches: + - master # or the name of your main branch + - develop + - main + - sonarqube-integration + + workflow_dispatch: + +jobs: + build: + name: Sonar_Analysis + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - 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 }} diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..bd349c2 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectKey=lib-flysystem-filecache From cd65ab213f9e2b6a52379758415cfb2edeb4ac4e Mon Sep 17 00:00:00 2001 From: Edwin Date: Thu, 18 May 2023 17:45:08 +0530 Subject: [PATCH 2/5] adding github action for sonar and added sonar property file --- .github/workflows/sonar.yml | 16 ++++++++-------- sonar-project.properties | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index d30cb81..2e6fd4c 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -1,12 +1,12 @@ name: Sonar_Analysis on: - push: - branches: - - master # or the name of your main branch - - develop - - main - - sonarqube-integration - + pull_request: + branches: + - '**' + push: + branch: + - 'main' + - 'sonarqube-integration' workflow_dispatch: jobs: @@ -14,7 +14,7 @@ jobs: name: Sonar_Analysis runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - uses: sonarsource/sonarqube-scan-action@master diff --git a/sonar-project.properties b/sonar-project.properties index bd349c2..7e656fa 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1 +1,3 @@ sonar.projectKey=lib-flysystem-filecache +sonar.sources=. +sonar.inclusions=**/*.sh From 93ceeb78661635e006ddcb3cac151f3261f8de17 Mon Sep 17 00:00:00 2001 From: Edwin Date: Thu, 18 May 2023 18:30:18 +0530 Subject: [PATCH 3/5] adding github action for sonar and added sonar property file --- sonar-project.properties | 2 -- 1 file changed, 2 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index 7e656fa..bd349c2 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,3 +1 @@ sonar.projectKey=lib-flysystem-filecache -sonar.sources=. -sonar.inclusions=**/*.sh From 082049a686f05f3c81d38f19d186adffcc9cbcad Mon Sep 17 00:00:00 2001 From: Edwin Date: Fri, 26 May 2023 15:14:06 +0530 Subject: [PATCH 4/5] include additional branches --- .github/workflows/sonar.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 2e6fd4c..477712d 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -7,6 +7,9 @@ on: branch: - 'main' - 'sonarqube-integration' + - 'master' + - 'develop' + workflow_dispatch: jobs: From e4c94efdff039f62f5b330ce11bdfb2d43e15d9d Mon Sep 17 00:00:00 2001 From: Edwin Date: Fri, 26 May 2023 17:29:55 +0530 Subject: [PATCH 5/5] include additional branches --- .github/workflows/sonar.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 477712d..24306e3 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -6,9 +6,7 @@ on: push: branch: - 'main' - - 'sonarqube-integration' - 'master' - - 'develop' workflow_dispatch: