Skip to content
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

Created Sonar Job for code analysis #200

Merged
merged 7 commits into from
Oct 2, 2024
Merged

Created Sonar Job for code analysis #200

merged 7 commits into from
Oct 2, 2024

Conversation

rjkoh
Copy link
Contributor

@rjkoh rjkoh commented Sep 19, 2024

Description

Created job that:

  1. Fetches relevant repos from github org
  2. Creates project for repo on sonarqube if not yet done
  3. Checks for build tool (Maven, Gradle, or others) - dotnet not yet implemented
  4. Git clone or pull latest main branch
  5. Scans code
  6. Query and save relevant metrics

Changes

  • Created model on backend and shared type for Code Analysis data
  • Created codeAnalysisJob
  • Added codeAnalysisJob to app.ts on backend

Screenshots (if applicable)

Additional Notes

Include any additional comments or context.

Resolves #198

@rjkoh rjkoh closed this Sep 19, 2024
@rjkoh rjkoh reopened this Sep 19, 2024
Copy link
Contributor

@dexter-sim dexter-sim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left comments for some minor changes. LGTM.


const createProjectIfNotExists = async (repo: string) => {
try {
const sonarUri = process.env.SONAR_URI;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is sonarUri a fixed string? If it is just a fixed string value, we can put it in endpoints.ts instead of as an environment variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During dev, I first test it out on localhost, before testing it out on staging so I do change the sonarUri. On staging and eventually prod itll be localhost:9000

@rjkoh
Copy link
Contributor Author

rjkoh commented Oct 2, 2024

@rjkoh rjkoh merged commit 7ad5286 into NUS-CRISP:staging Oct 2, 2024
2 checks passed
@dexter-sim dexter-sim mentioned this pull request Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants