BUILD-9971 remove obsolete versioning #322
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-* | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| get-build-number: | |
| outputs: | |
| BUILD_NUMBER: ${{ steps.get-build-number.outputs.BUILD_NUMBER }} | |
| runs-on: sonar-xs-public | |
| name: Get build number | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: SonarSource/ci-github-actions/get-build-number@master # dogfood | |
| id: get-build-number | |
| build: | |
| runs-on: sonar-s-public | |
| name: Build | |
| permissions: | |
| id-token: write | |
| contents: write | |
| attestations: write | |
| needs: get-build-number | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0 | |
| with: | |
| version: 2025.7.12 | |
| - name: Build, Analyze and deploy | |
| id: build | |
| uses: SonarSource/ci-github-actions/build-gradle@master # dogfood | |
| env: | |
| BUILD_NUMBER: ${{ needs.get-build-number.outputs.BUILD_NUMBER }} | |
| with: | |
| deploy-pull-request: true | |
| artifactory-reader-role: private-reader | |
| artifactory-deployer-role: qa-deployer | |
| use-develocity: true | |
| provenance: 'true' | |
| - name: verify build-gradle behavior | |
| env: | |
| DEPLOYED: ${{ steps.build.outputs.deployed }} | |
| run: | | |
| if [[ "$DEPLOYED" != "true" ]]; then | |
| echo "ERROR: steps.build.outputs.deployed is not true" | |
| exit 1 | |
| fi | |
| - name: QA test | |
| shell: bash | |
| env: | |
| SONARSOURCE_REPOSITORY: sonarsource-qa | |
| run: | | |
| # Removing local artifacts to showcase downloading from sonarsource-qa | |
| ./gradlew --stop | |
| rm -rf ~/.gradle/caches/modules-2/files-2.1/org.sonarsource.sonarqube/sonar-plugin-api/ | |
| echo "Running QA tests against $ARTIFACTORY_URL/$SONARSOURCE_REPOSITORY..." | |
| ./gradlew test --info --no-scan | tee qa-test.log | |
| grep "Downloading https://repox.jfrog.io/artifactory/sonarsource-qa/org/sonarsource/sonarqube/sonar-plugin-api/" qa-test.log | |
| build-windows: | |
| runs-on: warp-custom-windows-2022-s | |
| name: Build Windows | |
| permissions: | |
| id-token: write | |
| contents: write | |
| attestations: write | |
| needs: get-build-number | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0 | |
| with: | |
| version: 2025.7.12 | |
| - uses: SonarSource/ci-github-actions/build-gradle@master # dogfood | |
| id: build | |
| env: | |
| BUILD_NUMBER: ${{ needs.get-build-number.outputs.BUILD_NUMBER }} | |
| with: | |
| deploy: false | |
| artifactory-reader-role: private-reader | |
| artifactory-deployer-role: qa-deployer | |
| use-develocity: true | |
| provenance: 'true' | |
| - name: verify build-gradle behavior | |
| shell: bash | |
| env: | |
| DEPLOYED: ${{ steps.build.outputs.deployed }} | |
| run: | | |
| if [[ "$DEPLOYED" = "true" ]]; then | |
| echo "ERROR: steps.build.outputs.deployed is true" | |
| exit 1 | |
| fi | |
| promote: | |
| needs: | |
| - get-build-number | |
| - build | |
| - build-windows | |
| runs-on: github-ubuntu-latest-s | |
| name: Promote | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - uses: SonarSource/ci-github-actions/promote@master # dogfood | |
| env: | |
| BUILD_NUMBER: ${{ needs.get-build-number.outputs.BUILD_NUMBER }} | |
| with: | |
| promote-pull-request: true |