Skip to content

Commit 6b0032e

Browse files
committed
chore: update README.md
1 parent 0b9cde5 commit 6b0032e

File tree

1 file changed

+48
-13
lines changed

1 file changed

+48
-13
lines changed

README.md

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Use the included `setup.sh` script to automatically deploy workflows across mult
3232
#### Prerequisites
3333

3434
- **Required Tools**: `git`, `jq`, GitHub authentication (GitHub CLI or git credentials)
35-
- **Required Files**: `repos.json` with repository names, SonarQube token configured in each repository
35+
- **Required Files**: `repos.json` with repository names, SonarQube URL variable and token secret configured (organization or repository level)
3636

3737
#### Steps
3838

@@ -47,11 +47,26 @@ Use the included `setup.sh` script to automatically deploy workflows across mult
4747
]
4848
```
4949

50-
2. **Set Up SonarQube Token**:
50+
2. **Set Up SonarQube Configuration**:
51+
52+
**SonarQube Server URL (Organization Variable)**
53+
54+
- Go to your organization's **Settings > Secrets and variables > Actions**
55+
- Switch to the **Variables** tab
56+
- Add organization variable named `SONARQUBE_URL` with your server URL (e.g., `https://sonarqube.ing.puc.cl`)
57+
- Configure repository access (all repositories or selected repositories)
58+
59+
**SonarQube Token (Organization Secret)**
5160

5261
- Generate a user token in your SonarQube server (User > My Account > Security)
53-
- Add `SONARQUBE_TOKEN` secret to each repository (Settings > Secrets and variables > Actions)
5462
- Token must have project creation permissions
63+
- In the same organization settings page, switch to **Secrets** tab
64+
- Add organization secret named `SONARQUBE_TOKEN`
65+
- Configure repository access (all repositories or selected repositories)
66+
67+
**Alternative: Individual Repository Setup**
68+
69+
- Add both `SONARQUBE_URL` variable and `SONARQUBE_TOKEN` secret to each repository individually
5570

5671
3. **Run Bulk Deployment**:
5772

@@ -78,17 +93,10 @@ Use the included `setup.sh` script to automatically deploy workflows across mult
7893

7994
For individual repository setup, create `.github/workflows/sonarqube-analysis.yml` manually and configure the workflow to use this reusable workflow.
8095

81-
## ⚙️ Configuration Parameters
82-
83-
| Parameter | Required | Default | Description |
84-
| ----------------------- | -------- | --------------- | ------------------------------------------------ |
85-
| `sonarqube_url` | ✅ Yes | - | URL of your SonarQube server |
86-
| `sonarqube_project_key` | ❌ No | Repository name | Custom project key for SonarQube |
87-
| `java_version` | ❌ No | `17` | Java version (auto-detected if not specified) |
88-
| `node_version` | ❌ No | `18` | Node.js version (auto-detected if not specified) |
89-
| `python_version` | ❌ No | `3.11` | Python version (auto-detected if not specified) |
96+
## ⚙️ GitHub Organization Configuration Parameters
9097

91-
**Required Secret**: `SONARQUBE_TOKEN` - SonarQube authentication token
98+
- **Variable**: `SONARQUBE_URL` - SonarQube server URL (organization or repository variable)
99+
- **Secret**: `SONARQUBE_TOKEN` - SonarQube authentication token (organization or repository secret)
92100

93101
## 🔄 Workflow Process
94102

@@ -98,6 +106,33 @@ For individual repository setup, create `.github/workflows/sonarqube-analysis.ym
98106
4. **Code Analysis**: Runs comprehensive quality analysis with proper exclusions
99107
5. **Quality Gate**: Reports results without failing the workflow (informational only)
100108

109+
## ⚡ When Analysis Runs
110+
111+
**Analysis Triggers:**
112+
113+
-**Push to `main` branch** - Every commit to main triggers analysis
114+
-**Merged Pull Requests** - When PRs are merged to main, analysis runs automatically
115+
-**Feature branch commits** - Only main branch commits are analyzed
116+
-**Draft or open PRs** - No analysis on non-main branches
117+
118+
## 🏷️ Automatic Project Tagging
119+
120+
For repositories following the naming convention `[year]-[semester]-S[section]-Grupo[group]-[project_name]`, the workflow automatically creates these SonarQube project tags:
121+
122+
| Tag Level | Format | Example | Purpose |
123+
| ------------------- | ------------------------------------------- | ------------------ | -------------------------------- |
124+
| **Academic Period** | `[year]-[semester]` | `2025-1` | Groups all projects by semester |
125+
| **Course Section** | `[year]-[semester]-S[section]` | `2025-1-S3` | Groups projects by class section |
126+
| **Team Group** | `[year]-[semester]-S[section]-Grupo[group]` | `2025-1-S3-Grupo3` | Groups projects by team |
127+
128+
**Example**: Repository `2025-1-S3-Grupo3-Final-Project` gets tagged with:
129+
130+
- `2025-1` (all first semester 2025 projects)
131+
- `2025-1-S3` (all section 3 projects)
132+
- `2025-1-S3-Grupo3` (all team 3 projects)
133+
134+
⚠️ **Note**: If repository name doesn't match the expected format, no automatic tags are applied.
135+
101136
## 🔍 Automatic Language Support
102137

103138
- **Java**: Any version, detected by `.java` files, `pom.xml`, or `build.gradle`

0 commit comments

Comments
 (0)