#56 - Make Sonar analysis step optional to support fork CI #57
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openrn/react-native-logging-tools!57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "56-Make-Sonar-analysis-step-optional-to-support-fork-CI"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Make the Sonar analysis step optional across all CI workflows to support forked repositories. Sonar-specific configuration (
host URL,project key,project name) is moved out ofsonar-project.propertiesand into CI variables/secrets. All four workflows now skip the Sonar job gracefully when the required values are not configured, so fork CI passes cleanly without any Sonar setup.Type of Change
Related Issue
Fixes #56
Testing
No application code was changed. CI changes can be validated by verifying that:
tag.yaml, thepublishjob still runs when the Sonar job is skipped.Breaking Changes
None. The Sonar job behaviour is unchanged for repositories that have all required values configured.
Checklist
Additional Notes
Changed files:
.forgejo/workflows/pr.yaml— addedifcondition + env vars (SONAR_HOST_URL,SONAR_PROJECT_KEY,SONAR_PROJECT_NAME) + passed via-Dflags.forgejo/workflows/master.yaml— same changes.forgejo/workflows/dev.yaml— same changes.forgejo/workflows/tag.yaml— same changes +publishjob updated withif: always() && (needs.sonar.result == 'success' || needs.sonar.result == 'skipped')to prevent blocking on skipped Sonarsonar-project.properties— removedsonar.host.url,sonar.projectKey,sonar.projectNameCONTRIBUTING.md— added "CI & Sonar Analysis" section documenting the required secret and variables for fork contributorsRequired CI configuration for Sonar to run:
SONAR_TOKENSONAR_HOST_URLSONAR_PROJECT_KEYSONAR_PROJECT_NAME