Update Gradle to v9.8.0 (#586) #1802
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - branch-* | |
| - dogfood-* | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| # Workflow-level concurrency | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} | |
| # Required permissions for Vault OIDC and repo operations | |
| permissions: | |
| id-token: write | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: sonar-s | |
| name: Build | |
| outputs: | |
| PROJECT_VERSION: ${{ steps.build-step.outputs.project-version }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0 | |
| with: | |
| version: 2026.6.1 | |
| - id: build-step | |
| uses: SonarSource/ci-github-actions/build-gradle@21206070b4306949454171904b8d2b4ec349b0c5 # 2.0.1 | |
| with: | |
| deploy-pull-request: true | |
| artifactory-reader-role: private-reader | |
| artifactory-deployer-role: qa-deployer | |
| sonar-platform: sqc-eu | |
| gradle-args: :cyclonedxBom jacocoTestReport | |
| use-develocity: true | |
| integration: | |
| needs: [build] | |
| runs-on: github-ubuntu-latest-m | |
| name: IT - ${{ matrix.name }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: STDIO | |
| test_class: StdioTransportITest | |
| - name: HTTP | |
| test_class: HttpTransportITest | |
| - name: ProxiedServer | |
| test_class: ProxiedServerITest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0 | |
| with: | |
| version: 2026.6.1 | |
| - name: Vault (SonarCloud IT token) | |
| id: vault_it_token | |
| uses: SonarSource/vault-action-wrapper@a7fa5fd4a4e4e0f2593f6137c0812cac196cf4ce # 3.7.0 | |
| with: | |
| secrets: | | |
| development/team/sonarlint/kv/data/sonarcloud-it token | SONARCLOUD_IT_TOKEN; | |
| - uses: SonarSource/ci-github-actions/config-gradle@21206070b4306949454171904b8d2b4ec349b0c5 # 2.0.1 | |
| with: | |
| artifactory-reader-role: private-reader | |
| - name: Download plugin from Artifactory | |
| env: | |
| PROJECT_VERSION: ${{ needs.build.outputs.PROJECT_VERSION }} | |
| run: | | |
| set -euo pipefail | |
| echo "Using project version: ${PROJECT_VERSION}" | |
| DOWNLOAD_URL="${ARTIFACTORY_URL}/sonarsource-public-qa/org/sonarsource/sonarqube/mcp/server/sonarqube-mcp-server/${PROJECT_VERSION}/sonarqube-mcp-server-${PROJECT_VERSION}.jar" | |
| curl -fsSL -u "${ARTIFACTORY_ACCESS_USERNAME}:${ARTIFACTORY_ACCESS_TOKEN}" \ | |
| -o sonarqube-mcp-server.jar \ | |
| "${DOWNLOAD_URL}" | |
| mkdir -p ${GITHUB_WORKSPACE}/downloaded-plugin | |
| mv sonarqube-mcp-server.jar ${GITHUB_WORKSPACE}/downloaded-plugin/ | |
| - name: Run Integration Tests | |
| env: | |
| SONARCLOUD_IT_TOKEN: ${{ steps.vault_it_token.outputs.vault && fromJSON(steps.vault_it_token.outputs.vault).SONARCLOUD_IT_TOKEN || '' }} | |
| DOWNLOADED_JAR_PATH: ${{ github.workspace }}/downloaded-plugin/sonarqube-mcp-server.jar | |
| run: | | |
| ./gradlew :its:integrationTest --tests "*${{ matrix.test_class }}" --info | |
| promote: | |
| needs: [build, integration] | |
| runs-on: github-ubuntu-latest-s # Public repository runner | |
| name: Promote | |
| steps: | |
| - uses: SonarSource/ci-github-actions/promote@21206070b4306949454171904b8d2b4ec349b0c5 # 2.0.1 | |
| with: | |
| promote-pull-request: true |