From de83acefab9f9b63ba9297495c1aecad2798f0a5 Mon Sep 17 00:00:00 2001 From: as2024ad <183369419+as2024ad@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:23:51 +0000 Subject: [PATCH 1/7] Test SONAR_TOKEN_AS --- .github/workflows/sonarqube.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 85308f82..9e4344f9 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -52,7 +52,7 @@ jobs: - name: Build, Test and Analyze env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_TOKEN_AS: ${{ secrets.SONAR_TOKEN_AS }} run: | dotnet-sonarscanner begin \ /k:"DFE-Digital_childrens-social-care-cpd" \ @@ -61,8 +61,8 @@ jobs: /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml \ /d:sonar.exclusions="**/*.css,**/*.scss,**/Models/*,**/Program.cs,**/WebApplicationBuilderExtensions.cs,**/GraphQL/Queries/*,**/Contentful-Schema/migrations/*.cjs" \ /d:sonar.test.exclusions="Childrens-Social-Care-CPD-Tests/**/*,Terraform-bootstrap/Error-pages/*" \ - /d:sonar.token="${{ secrets.SONAR_TOKEN }}" \ + /d:sonar.token="${{ secrets.SONAR_TOKEN_AS }}" \ /d:sonar.host.url="https://sonarcloud.io" dotnet build --no-incremental dotnet-coverage collect --settings dotnet-cover-config.xml -f xml -o coverage.xml "dotnet test" - dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" + dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN_AS }}" From 93677921af3e6704f905b401aa04ee07cb720165 Mon Sep 17 00:00:00 2001 From: as2024ad <183369419+as2024ad@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:31:02 +0000 Subject: [PATCH 2/7] Workflow trigger --- .github/workflows/sonarqube.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 9e4344f9..5d5df729 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -1,9 +1,10 @@ name: Static code analysis on: - pull_request: - branches: - - main - - next + workflow_dispatch: + # pull_request: + # branches: + # - main + # - next jobs: code-analysis: name: Static code analysis From 646b91f297dbdf28f60beec125a6f6c06434e7f4 Mon Sep 17 00:00:00 2001 From: as2024ad <183369419+as2024ad@users.noreply.github.com> Date: Thu, 5 Dec 2024 17:13:51 +0000 Subject: [PATCH 3/7] - --- .github/workflows/sonarqube.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 5d5df729..b1a3a7ad 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -1,10 +1,10 @@ name: Static code analysis on: workflow_dispatch: - # pull_request: - # branches: - # - main - # - next + pull_request: + branches: + - main + - next jobs: code-analysis: name: Static code analysis From 6c926c2e78d0d3f5f4e20808edd64a2e46022ed1 Mon Sep 17 00:00:00 2001 From: as2024ad <183369419+as2024ad@users.noreply.github.com> Date: Thu, 5 Dec 2024 17:42:13 +0000 Subject: [PATCH 4/7] - --- .github/workflows/sonarqube.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index b1a3a7ad..a84b7d42 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -56,8 +56,8 @@ jobs: SONAR_TOKEN_AS: ${{ secrets.SONAR_TOKEN_AS }} run: | dotnet-sonarscanner begin \ - /k:"DFE-Digital_childrens-social-care-cpd" \ - /o:"dfe-digital" \ + /k:"as2024ad_sfsw" \ + /o:"as2024ad" \ /d:sonar.qualitygate.wait=true \ /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml \ /d:sonar.exclusions="**/*.css,**/*.scss,**/Models/*,**/Program.cs,**/WebApplicationBuilderExtensions.cs,**/GraphQL/Queries/*,**/Contentful-Schema/migrations/*.cjs" \ From a5c3b6406817053fa48ef1bd624cc5d7ca97b357 Mon Sep 17 00:00:00 2001 From: as2024ad <183369419+as2024ad@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:57:33 +0000 Subject: [PATCH 5/7] on trigger --- .github/workflows/sonarqube.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index a84b7d42..268c6497 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -1,10 +1,13 @@ name: Static code analysis + on: - workflow_dispatch: + workflow_dispatch: + push: + branches: ["next", "main", "release/**", "feature/**", "fix/**"] pull_request: - branches: - - main - - next + types: [opened, synchronize, reopened] + # branches: ["next", "main", "release/**", "feature/**", "fix/**"] + jobs: code-analysis: name: Static code analysis From 5b5ee56343e50b2ef6fc37d66e8cbba1908021a9 Mon Sep 17 00:00:00 2001 From: as2024ad <183369419+as2024ad@users.noreply.github.com> Date: Fri, 6 Dec 2024 11:45:31 +0000 Subject: [PATCH 6/7] - --- .github/workflows/sonarqube.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 268c6497..637388e7 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -2,11 +2,9 @@ name: Static code analysis on: workflow_dispatch: - push: - branches: ["next", "main", "release/**", "feature/**", "fix/**"] pull_request: types: [opened, synchronize, reopened] - # branches: ["next", "main", "release/**", "feature/**", "fix/**"] + branches: ["next", "main", "release/**", "feature/**", "fix/**"] jobs: code-analysis: From 38929d0b4271fab322ac6f76386bfca293a33a04 Mon Sep 17 00:00:00 2001 From: as2024ad <183369419+as2024ad@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:46:05 +0000 Subject: [PATCH 7/7] - --- .github/workflows/sonarqube.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 637388e7..3dc553a5 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: pull_request: types: [opened, synchronize, reopened] - branches: ["next", "main", "release/**", "feature/**", "fix/**"] + # branches: ["next", "main", "release/**", "feature/**", "fix/**"] jobs: code-analysis: