Skip to content
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
88d1bbf
Create sonarqube.yml
yashmeet29 Jun 7, 2024
16030c0
Update sonarqube.yml
yashmeet29 Jun 7, 2024
6e5c818
Update sonarqube.yml
yashmeet29 Jun 7, 2024
5b4eaca
Update sonarqube.yml
yashmeet29 Jun 7, 2024
ac82a24
Update sonarqube.yml
yashmeet29 Jun 7, 2024
ffcb13c
Remove ls
yashmeet29 Jun 7, 2024
d31375b
Merge branch 'develop' into sonarcubeConfiguration
yashmeet29 Jun 7, 2024
b8f0287
Update sonarqube.yml
yashmeet29 Jun 7, 2024
f7212d8
Update sonarqube.yml
yashmeet29 Jun 7, 2024
ea2e398
Update sonarqube.yml
yashmeet29 Jun 7, 2024
c4fc67a
Update sonarqube.yml
yashmeet29 Jun 7, 2024
7d40563
Update sonarqube.yml
yashmeet29 Jun 7, 2024
c0cd2d1
Merge branch 'develop' into sonarcubeConfiguration
yashmeet29 Jun 13, 2024
c3907da
Update sonarqube.yml
yashmeet29 Jun 19, 2024
3c6393a
Merge branch 'develop' into sonarcubeConfiguration
yashmeet29 Jun 19, 2024
fe76e3c
Update sonarqube.yml
yashmeet29 Jun 19, 2024
15564ab
Update sonarqube.yml
yashmeet29 Jun 19, 2024
bd1b773
Update sonarqube.yml
yashmeet29 Jun 19, 2024
d1809dd
Update sonarqube.yml
yashmeet29 Jun 19, 2024
f8518c9
Update sonarqube.yml
yashmeet29 Jun 19, 2024
2765ace
Update sonarqube.yml
yashmeet29 Jun 19, 2024
33dff2e
Update sonarqube.yml
yashmeet29 Jun 20, 2024
d25569c
Merge branch 'develop' into sonarcubeConfiguration
yashmeet29 Jun 20, 2024
903b85b
Update sonarqube.yml
yashmeet29 Jun 20, 2024
78e7035
Update sonarqube.yml
yashmeet29 Jun 20, 2024
6e316f0
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
ab69373
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
c19bdf2
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
0c0ff79
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
c59e390
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
5b238a3
Create sonar-project.properties
vibhutikumar07 Jun 20, 2024
f7f5969
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
cde498c
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
dcf655e
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
5c3ff3d
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
2cead1f
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
8ac3479
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
bbb7829
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
c99c1cb
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
4fe73d6
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
e496233
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
331f57c
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
3ef4894
Delete sonar-project.properties
vibhutikumar07 Jun 20, 2024
760a315
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
fd2d672
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
9459dcf
Update sonarqube.yml
vibhutikumar07 Jun 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow helps you trigger a SonarQube analysis of your code and populates
# GitHub Code Scanning alerts with the vulnerabilities found.
# (this feature is available starting from SonarQube 9.7, Developer Edition and above)

# 1. Make sure you add a valid GitHub configuration to your SonarQube (Administration > DevOps platforms > GitHub)

# 2. Import your project on SonarQube
# * Add your repository as a new project by clicking "Create project" from your homepage.
#
# 3. Select GitHub Actions as your CI and follow the tutorial
# * a. Generate a new token and add it to your GitHub repository's secrets using the name SONAR_TOKEN
# (On SonarQube, click on your avatar on top-right > My account > Security or ask your administrator)
#
# * b. Copy/paste your SonarQube host URL to your GitHub repository's secrets using the name SONAR_HOST_URL
#
# * c. Copy/paste the project Key into the args parameter below
# (You'll find this information in SonarQube by following the tutorial or by clicking on Project Information at the top-right of your project's homepage)

# Feel free to take a look at our documentation (https://docs.sonarqube.org/latest/analysis/github-integration/)
# or reach out to our community forum if you need some help (https://community.sonarsource.com/c/sq/10)

name: SonarQube analysis

on:
push:
branches:
- develop
pull_request:
branches:
- develop
types: [opened, synchronize, reopened]
workflow_dispatch:

permissions:
pull-requests: read # allows SonarQube to decorate PRs with analysis results

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: npm install and test
run: |
npm install
npm run test

- name: Analyze with SonarQube
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
with:
# Additional arguments for the sonarcloud scanner
args:
-Dsonar.projectKey=cap-js-sdm
-Dsonar.sources=lib
-Dsonar.exclusions=**/node_modules/**
-Dsonar.js.file.suffixes=.js
-Dsonar.qualitygate.wait=true
-Dsonar.exclusions=/dist/,/node_modules/,**/*.spec.js,**/*.test.js
-Dsonar.verbose=false # This should generally be set to `false` in a production environment to not clutter logs. Use `true` for debugging.


# 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.
# We do not recommend to use this in a pull request. Prefer using pull request
# decoration instead.
- uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}