Hello Everyone,
Thank you for your support,
We recently bought paid subscription for SonarCloud, I want to run sonarscan through github-actions, but I always get the below error.
ERROR: You must define the following mandatory properties for 'Unknown': sonar.projectKey, sonar.organization
below is my pipline.
name: SonarCloud Scan
on:
push:
branches:
- codescan
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Build with NPM
run: npm install
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_PROJECT_KEY: "organizarion"
SONAR_PROJECT_NAME: "github repo name"
with:
projectBaseDir: .
Any help is appreciated.
Thanks
Niranjan