Skip to content

Build

Build #453

Workflow file for this run

name: Build
on:
push:
branches:
- master
- branch-*
- dogfood-*
pull_request:
workflow_dispatch:
schedule:
- cron: "30 1 * * *" # Run daily at 01:30 AM UTC
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: github-ubuntu-latest-s
name: Build
permissions:
id-token: write # Required for Vault OIDC authentication
contents: write # Required for repository access and tagging
outputs:
build-number: ${{ steps.build-step.outputs.BUILD_NUMBER }}
deployed: ${{ steps.build-step.outputs.deployed }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
with:
version: 2025.7.12
- name: Select Java 17
run: mise use java@17
- uses: SonarSource/ci-github-actions/build-gradle@v1
id: build-step
with:
deploy-pull-request: true
artifactory-reader-role: private-reader
artifactory-deployer-role: qa-deployer
build-qa-windows:
name: Build and QA Windows
needs: build
runs-on: github-windows-latest-m
permissions:
id-token: write # Required for Vault OIDC authentication
contents: write # Required for repository access and tagging
env:
BUILD_NUMBER: ${{ needs.build.outputs.build-number }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
with:
version: 2025.7.12
- name: Select Java 17
run: mise use java@17
- name: Get GitHub Token for QA Licenses
id: secrets
uses: SonarSource/vault-action-wrapper@v3
with:
secrets: |
development/github/token/licenses-ro token | GITHUB_TOKEN;
- name: Configure Gradle
uses: SonarSource/ci-github-actions/config-gradle@v1
with:
artifactory-reader-role: private-reader
- name: Build
env:
GITHUB_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).GITHUB_TOKEN }}
run: ./gradlew -D"sonar.runtimeVersion"="LATEST_RELEASE[2025.4]" -DbuildNumber=$BUILD_NUMBER --no-daemon --console plain --info --stacktrace build test -PintegrationTests=true
qa:
needs: [build]
if: ${{ needs.build.outputs.deployed }}
runs-on: github-ubuntu-latest-m
permissions:
id-token: write
contents: read
strategy:
fail-fast: false
matrix:
item:
- { sq-version: "LATEST_RELEASE[2025.1]" }
- { sq-version: "LATEST_RELEASE[2025.4]" }
- { sq-version: "DEV" }
name: "QA Tests - SQ : ${{ matrix.item.sq-version }}"
env:
BUILD_NUMBER: ${{ needs.build.outputs.build-number }}
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
with:
version: 2025.7.12
- name: Select Java 21
run: mise use java@21
- name: Get GitHub Token for QA Licenses
id: secrets
uses: SonarSource/vault-action-wrapper@v3
with:
secrets: |
development/github/token/licenses-ro token | GITHUB_TOKEN;
- name: Configure Gradle
uses: SonarSource/ci-github-actions/config-gradle@v1
with:
artifactory-reader-role: private-reader
- name: Run QA Tests
shell: bash
env:
SQ_VERSION: ${{ matrix.item.sq-version }}
GITHUB_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).GITHUB_TOKEN }}
run: >-
./gradlew -DbuildNumber=$BUILD_NUMBER
-PintegrationTests=true
-Dsonar.runtimeVersion=$SQ_VERSION
-Dorchestrator.artifactory.accessToken=$ARTIFACTORY_ACCESS_TOKEN
--console plain --no-daemon --info
build test
promote:
needs: [build, build-qa-windows, qa]
if: ${{ needs.build.outputs.deployed }}
runs-on: github-ubuntu-latest-s
name: Promote
permissions:
id-token: write
contents: write
env:
BUILD_NUMBER: ${{ needs.build.outputs.build-number }}
steps:
- uses: SonarSource/ci-github-actions/promote@v1
with:
promote-pull-request: true