Skip to content

Commit 86beb9a

Browse files
MCP-86 Migrate to GitHub Actions (#86)
* MCP-86 Migrate to GitHub Actions
1 parent 451aec9 commit 86beb9a

File tree

9 files changed

+120
-178
lines changed

9 files changed

+120
-178
lines changed

.cirrus.star

Lines changed: 0 additions & 5 deletions
This file was deleted.

.cirrus.yml

Lines changed: 0 additions & 171 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- branch-*
8+
- dogfood-*
9+
pull_request:
10+
merge_group:
11+
workflow_dispatch:
12+
13+
# Workflow-level concurrency
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16+
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }}
17+
18+
# Required permissions for Vault OIDC and repo operations
19+
permissions:
20+
id-token: write
21+
contents: write
22+
23+
jobs:
24+
build:
25+
runs-on: github-ubuntu-latest-s # Public repository runner
26+
name: Build
27+
steps:
28+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
29+
- uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2.4.4
30+
with:
31+
version: 2025.7.12
32+
- uses: SonarSource/ci-github-actions/build-gradle@v1
33+
with:
34+
deploy-pull-request: true
35+
artifactory-reader-role: private-reader
36+
artifactory-deployer-role: qa-deployer
37+
sonar-platform: sqc-eu
38+
gradle-args: ":cyclonedxBom jacocoTestReport"
39+
40+
promote:
41+
needs: [build]
42+
runs-on: github-ubuntu-latest-s # Public repository runner
43+
name: Promote
44+
steps:
45+
- uses: SonarSource/ci-github-actions/promote@v1
46+
with:
47+
promote-pull-request: true

.github/workflows/pr-cleanup.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Cleanup PR Resources
2+
3+
on:
4+
pull_request:
5+
types: [ closed ]
6+
7+
jobs:
8+
cleanup:
9+
runs-on: github-ubuntu-latest-s
10+
permissions:
11+
actions: write
12+
steps:
13+
- uses: SonarSource/ci-github-actions/pr_cleanup@v1

.github/workflows/shadow_scans.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Shadow scans
2+
on:
3+
schedule:
4+
# Run the workflow every day at 04:00 UTC
5+
- cron: '0 4 * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
scan:
10+
runs-on: github-ubuntu-latest-s
11+
name: Scan on shadow platforms
12+
permissions:
13+
id-token: write
14+
contents: write
15+
steps:
16+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
17+
- uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2.4.4
18+
with:
19+
version: 2025.7.12
20+
- uses: SonarSource/ci-github-actions/build-gradle@master # dogfood
21+
with:
22+
run-shadow-scans: true
23+
artifactory-reader-role: private-reader
24+
artifactory-deployer-role: qa-deployer
25+
gradle-args: ":jacocoTestReport"
26+
- name: Run IRIS Analysis
27+
uses: SonarSource/unified-dogfooding-actions/run-iris@v1
28+
with:
29+
primary_project_key: "SonarSource_sonarqube-mcp-server"
30+
primary_platform: "SQC-EU"
31+
shadow1_project_key: "SonarSource_sonarqube-mcp-server"
32+
shadow1_platform: "Next"
33+
shadow2_project_key: "SonarSource_sonarqube-mcp-server"
34+
shadow2_platform: "SQC-US"

.github/workflows/slack_notify.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Slack Notifications
2+
on:
3+
check_suite:
4+
types: [completed]
5+
6+
permissions:
7+
contents: read
8+
id-token: write
9+
checks: read
10+
jobs:
11+
slack-notifications:
12+
if: >-
13+
contains(fromJSON('["main", "master"]'), github.event.check_suite.head_branch) || startsWith(github.event.check_suite.head_branch, 'dogfood-') || startsWith(github.event.check_suite.head_branch, 'branch-')
14+
runs-on: github-ubuntu-latest-s
15+
steps:
16+
- name: Send Slack Notification
17+
env:
18+
GITHUB_TOKEN: ${{ github.token }}
19+
uses: SonarSource/gh-action_slack-notify@master
20+
with:
21+
slackChannel: squad-ide-mcp-server

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SonarQube MCP Server
22

3-
[![Build Status](https://api.cirrus-ci.com/github/SonarSource/sonarqube-mcp-server.svg?branch=master)](https://cirrus-ci.com/github/SonarSource/sonarqube-mcp-server)
3+
[![Build](https://github.com/SonarSource/sonarqube-mcp-server/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/SonarSource/sonarqube-mcp-server/actions/workflows/build.yml)
44
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=SonarSource_sonarqube-mcp-server&metric=alert_status&token=364a508a1e77096460f8571d8e66b41c99c95bea)](https://sonarcloud.io/summary/new_code?id=SonarSource_sonarqube-mcp-server)
55

66
The SonarQube MCP Server is a Model Context Protocol (MCP) server that enables seamless integration with SonarQube Server or Cloud for code quality and security.

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ sonar {
225225
property("sonar.organization", "sonarsource")
226226
property("sonar.projectKey", "SonarSource_sonarqube-mcp-server")
227227
property("sonar.projectName", "SonarQube MCP Server")
228-
property("sonar.links.ci", "https://cirrus-ci.com/github/SonarSource/sonarqube-mcp-server")
228+
property("sonar.links.ci", "https://github.com/SonarSource/sonarqube-mcp-server/actions")
229229
property("sonar.links.scm", "https://github.com/SonarSource/sonarqube-mcp-server")
230230
property("sonar.links.issue", "https://jira.sonarsource.com/browse/MCP")
231231
property("sonar.exclusions", "**/build/**/*")

mise.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[tools]
2+
java = "21.0"
3+
gradle = "8.13"

0 commit comments

Comments
 (0)