-
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
Feature #289 develop sonarqube_gha #290
Conversation
…N and SONAR_HOST_URL are both set.
…h that matches the source code branch
…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.
I can take a look at it, should we try to get this into the beta4 release?
|
@bikegeek, yes, since it came together so quickly and easily, I think I'll try to get all of these changes in for beta4. Working on the companion PR for the main_v2.1 branch now. |
I will add METreformat to the list of sonar.sources in the sonar-project-properties. There are some tests for the METreformat code, so the code coverage should be >0% if the tests are getting picked up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added METreformat to the sonar_project.properties. All the expected behaviors are observed. Approving.
These PR adds SonarQube Scanning to GitHub actions, as described below:
sonarqube.yml
defines the new workflow that is triggered by pushes to the develop or main branches, as well as pull requests to those branches. I also added a manual workflow dispatch option, but that won't show up in GitHub until these changes are also made in themain_v2.1
branch. This workflow checks out the code, determines the current branch name, runs a script to set up the SonarQube properties file, and then calls custom actions to perform the scan and check the results.configure_sonarqube.sh
customizes thesonar-project.properties
settings for the current run.sonar-project.properties
is updated with template values to be updated byconfigure_sonarqube.sh
and therun_sonarqube.sh
script used by the nightly build.run_sonarqube.sh
is the script run during the nightly build. This is updated to handle the newly-parameterizedsonar-project.properties
file.internal_tests
directory since the SonarQube scanning files were moved from there tointernal/scripts/sonarqube
(prior to this feature branch) for consistency with other METplus repos.Note that the scans were enhanced to include the actual code version number rather than just a hard-code string of
1.0
.Please also see this issue comment about a runtime exception. While this exception occurs when running on seneca, it DOES NOT occur when running through GitHub actions. I inspected the log from this run and see on lines 118-121 that no exception occurs:
Pull Request Testing
Describe testing already performed for these changes:
I manually ran the SonarQube scan for both the
develop
andmain_v2.1
branches so that they'd present in needham.rap.ucar.edu to serve as references.Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
Review the code changes.
Confirm that the SonarQube workflow runs for this PR.
Inspect the SonarQube server:
Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]
None needed.
Do these changes include sufficient testing updates? [Yes]
None needed.
Will this PR result in changes to the test suite? [No]
If yes, describe the new output and/or changes to the existing output:
Please complete this pull request review by [Fri 4/5/24].
Pull Request Checklist
See the METplus Workflow for details.
Select: Reviewer(s)
Select: Organization level software support Project or Repository level development cycle Project
Select: Milestone as the version that will include these changes