-
Notifications
You must be signed in to change notification settings - Fork 503
Add update-sonarqube job #2243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add update-sonarqube job #2243
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,7 @@ testbin/* | |
| *~ | ||
| *.DS_Store | ||
| .vscode | ||
| .scannerwork/ | ||
|
|
||
| # Credentials and runtime environment | ||
| kubeconfig | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -162,6 +162,25 @@ update-nspect: | |
| NSPECT_CLIENT_ID: "${NSPECT_PROD_CLIENT_ID}" | ||
| NSPECT_CLIENT_SECRET: "${NSPECT_PROD_CLIENT_SECRET}" | ||
|
|
||
| update-sonarqube: | ||
| stage: ngc-publish | ||
| needs: | ||
| - job: update-nspect | ||
| optional: true | ||
| - job: update-nspect-staging | ||
| optional: true | ||
| image: | ||
| name: sonarsource/sonar-scanner-cli:11 | ||
| entrypoint: [""] | ||
| variables: | ||
| SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" | ||
| GIT_DEPTH: "0" | ||
| rules: | ||
| - if: $CI_COMMIT_BRANCH == 'main' | ||
| allow_failure: true | ||
| script: | ||
| - sonar-scanner -Dsonar.host.url="${SONAR_HOST_URL}" -Dsonar.projectKey=gpu-operator -Dsonar.projectName=gpu-operator -Dsonar.sources=. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this do exactly? Is this performing a static analysis scan and uploading the results somewhere? What commit SHA is SonarQube scanning? With prior static analysis tools, we were able to schedule regular scans without having to add jobs to our CI. Can we do that with SonarQube and avoid having to add CI changes to all of our repositories?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes this is performing the scan and updating the sonar gpu-operator dashboard with the results. Unfortunately, the SonarQube dashboard does not provide a way to schedule regular scans; we need to trigger with CI/CD. I can try to see if I can move the scan command into the pre-existing NSPECT job if that is preferred. |
||
|
|
||
| .publish-images: | ||
| stage: ngc-publish | ||
| extends: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.