-
Notifications
You must be signed in to change notification settings - Fork 3
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 GitHub action to run SonarQube for METdataio pull requests and feature branches #289
Comments
…N and SONAR_HOST_URL are both set.
Followed these instructions to better integrate SonarQube with GitHub: To create a new GitHub app for the DTCenter organization (https://github.com/apps/dtcenter-sonarqube-integration) to support SonarQube integration. Installed that app in the DTCenter org settings (https://github.com/organizations/dtcenter/settings/apps) for 6 repositories: METplus, MET, METviewer, METplotpy, METcalcpy, METdataio Followed these instructions to setup GitHub user authentication for our SonarQube server: To create a new GitHub app for the DTCenter organization (https://github.com/apps/dtcenter-sonarqube-user-auth) to support GitHub user authentication at our SonarQube server. Members of the DTCenter GitHub organization are now able to authenticate at needham.rap.ucar.edu using their GitHub credentials. I was able to re-use two existing GitHub actions provided by SonarSource:
I did add steps before calling these actions to check out the code and configure the SonarQube properties file. |
I notice the following exception in the METdataio SonarQube scan. Need to ask @hsoh-u about this exception. It also appears in the Nightly Build output in
|
…es for SonarQube. These have been relocated to internal/scripts/sonarqube for consistency with other METplus repos. I checked the crontab entry on seneca for the met_test user that the latter version is used, and not this one I'm deleting.
* Per #289, add draft sonarqube.xml workflow. * Per #289, add logic for handling the sonar-project.properties file. * Per #289, remove scanning of my feature branch and also tweak run script. * Per #289, update the run_sonarqube.sh script to check that SONAR_TOKEN and SONAR_HOST_URL are both set. * Per #289, add logic to define SONAR_PROJECT_VERSION * Per #289 fix typo in ProjectName where METdatio should really be METdataio * Per #273, fix typo in properties file * Per #279, update run_sonarqube.sh script to push to a SonarQube branch that matches the source code branch * Per #279, update the PR template. * Per #289, remove the internal_tests directory which only contains files for SonarQube. These have been relocated to internal/scripts/sonarqube for consistency with other METplus repos. I checked the crontab entry on seneca for the met_test user that the latter version is used, and not this one I'm deleting. * Issue #289 Added METreformat to the list of sonar.sources --------- Co-authored-by: bikegeek <[email protected]>
* Per #289, same set of changes from PR #290, but for the main_v2.1 branch instead. * Update sonar-project.properties include checks for METreformat code --------- Co-authored-by: bikegeek <[email protected]>
* Rename METdbLoad/tests to METdbLoad/test for internal consistency, and try adding the sonar.coverage.exclusions setting to prevent new test code from counting against code coverage. * Try defining the exclusion directories using ** * Update the sonar.coverage.exclusions SonarQube setting to match filenames rather than just directories.
Describe the New Feature
This issue is to add a new SonarQube workflow to GitHub actions to automate the static code analysis for all pull requests. In addition, add a manual trigger workflow dispatch option where the reference branch can be manually specified.
Recommend adding this workflow to both the
develop
branch and the currentmain_v*
so that the workflow dispatch option can be made available.Recommend pushing results to a new SonarQube project named
METdataio GHA
at needham.rap.ucar.edu.Recommend having the workflow report bad status if the number of SonarQube findings are increased relative to the SonarQube reference.
See issue dtcenter/MET#2379 and its two linked PR's as an example, but the implementation for a python-only repo should be more straight-forward.
Acceptance Testing
List input data types and sources.
Describe tests required for new functionality.
Time Estimate
Estimate the amount of work required here.
Issues should represent approximately 1 to 3 days of work.
Sub-Issues
Consider breaking the new feature down into sub-issues.
Relevant Deadlines
List relevant project deadlines here or state NONE.
Funding Source
Needed for the Air Force - 2771024
Define the Metadata
Assignee
Labels
Projects and Milestone
Define Related Issue(s)
Consider the impact to the other METplus components.
The following SonarQube issues are closely related:
New Feature Checklist
See the METplus Workflow for details.
Branch name:
feature_<Issue Number>_<Description>
Pull request:
feature <Issue Number> <Description>
Select: Reviewer(s) and Development issues
Select: Repository level development cycle Project for the next official release
Select: Milestone as the next official version
The text was updated successfully, but these errors were encountered: