Skip to content

Gerrit Composed Sonar Cloud #4

Gerrit Composed Sonar Cloud

Gerrit Composed Sonar Cloud #4

Workflow file for this run

---
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2026 The Linux Foundation
name: Gerrit Composed Sonar Cloud
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
inputs:
GERRIT_BRANCH:
description: "Branch that change is against"
required: true
type: string
GERRIT_CHANGE_ID:
description: "The ID for the change"
required: true
type: string
GERRIT_CHANGE_NUMBER:
description: "The Gerrit number"
required: true
type: string
GERRIT_CHANGE_URL:
description: "URL to the change"
required: true
type: string
GERRIT_EVENT_TYPE:
description: "Type of Gerrit event"
required: true
type: string
GERRIT_PATCHSET_NUMBER:
description: "The patch number for the change"
required: true
type: string
GERRIT_PATCHSET_REVISION:
description: "The revision sha"
required: true
type: string
GERRIT_PROJECT:
description: "Project in Gerrit"
required: true
type: string
GERRIT_REFSPEC:
description: "Gerrit refspec of change"
required: true
type: string
schedule:
# Run weekly on Saturdays
- cron: "15 8 * * 6"
concurrency:
# yamllint disable-line rule:line-length
group: sonar-${{ github.workflow }}-${{ github.event.inputs.GERRIT_BRANCH || 'master' }}-${{ github.event.inputs.GERRIT_CHANGE_ID || github.run_id }}
cancel-in-progress: true
jobs:
sonar-scan:
# yamllint disable-line rule:line-length
uses: lfit/releng-reusable-workflows/.github/workflows/composed-maven-sonar-cloud.yaml@f43b219b8a91dcd082f26419008c8bf5544ec212 # v0.6.0
with:
GERRIT_BRANCH: ${{ inputs.GERRIT_BRANCH || 'master' }}
GERRIT_CHANGE_ID: ${{ inputs.GERRIT_CHANGE_ID || '' }}
GERRIT_CHANGE_NUMBER: ${{ inputs.GERRIT_CHANGE_NUMBER || '' }}
GERRIT_CHANGE_URL: ${{ inputs.GERRIT_CHANGE_URL || '' }}
GERRIT_EVENT_TYPE: ${{ inputs.GERRIT_EVENT_TYPE || 'schedule' }}
GERRIT_PATCHSET_NUMBER: ${{ inputs.GERRIT_PATCHSET_NUMBER || '' }}
GERRIT_PATCHSET_REVISION: ${{ inputs.GERRIT_PATCHSET_REVISION || '' }}
GERRIT_PROJECT: ${{ inputs.GERRIT_PROJECT || 'ovsdb' }}
GERRIT_REFSPEC: ${{ inputs.GERRIT_REFSPEC || 'refs/heads/master' }}
JDK_VERSION: "21"
MVN_VERSION: "3.9.9"
MVN_PARAMS: ""
MVN_PHASES: >-
clean install
org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar
SONAR_PROJECT_KEY: "opendaylight_ovsdb"
SONAR_ORG: "opendaylight"
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}