rework setup

This commit is contained in:
Jörn Müehlencord
2026-03-31 21:40:07 +02:00
parent 579324c62b
commit d4445fd6f0

View File

@@ -1,49 +1,46 @@
name: gitea pipeline build name: gitea pipeline build
inputs: inputs:
workflow_call:
inputs: inputs:
git_repository: git_repository:
description: 'repository to clone'
required: true required: true
type: string
java_version: java_version:
description: 'the Java Version to use'
required: true required: true
type: int
java_distribution: java_distribution:
description: 'the java distribution to use'
required: false required: false
type: string
default: "liberica" default: "liberica"
maven_version: maven_version:
description: 'the maven version to use'
required: false required: false
type: string default: '3.9.14'
default: 3.9.14
sonar_host: sonar_host:
description: 'the sonar host to use'
required: true required: true
type: string
dtrack_host_name: dtrack_host_name:
description: 'the dtrack server to use'
required: true required: true
type: string
# dtrack.muehlencord.de
dtrack_protocol: dtrack_protocol:
description: 'the protocol to connect to the dtrack server, default to https'
required: false required: false
type: string
default: "https" default: "https"
dtrack_port: dtrack_port:
description: 'the port to connect to the dtrack server to, defaults to 443'
required: false required: false
type: string
default: "443" default: "443"
dtrack_bom_file: dtrack_bom_file:
description: 'the location of the bom file'
required: true required: true
type: string
dtrack_project_uuid: dtrack_project_uuid:
description: 'the dtrack project id to use'
required: true required: true
type: string sonar_token:
secrets: description: 'the ssh key to use for checkout'
SSH_PRIVATE_KEY:
required: true required: true
SONAR_TOKEN: dtrack_api_key:
required: true description: 'the ssh key to use for checkout'
DTRACK_API_KEY:
required: true required: true
runs: runs:
@@ -71,15 +68,15 @@ runs:
- name: Build with Maven - name: Build with Maven
working-directory: source working-directory: source
shell: bash shell: bash
run: mvn -B clean verify sonar:sonar org.cyclonedx:cyclonedx-maven-plugin:makeAggregateBom -Dsonar.host.url="${{ inputs.sonar_host }}" -Dsonar.token="${{ secrets.SONAR_TOKEN }}" run: mvn -B clean verify sonar:sonar org.cyclonedx:cyclonedx-maven-plugin:makeAggregateBom -Dsonar.host.url="${{ inputs.sonar_host }}" -Dsonar.token="${{ inputs.sonar_token }}"
- name: Upload SBOM to DTrack - name: Upload SBOM to DTrack
uses: DependencyTrack/gh-upload-sbom@v3 uses: DependencyTrack/gh-upload-sbom@v3
with: with:
serverhostname: ${{ dtrack_host_name }} serverhostname: ${{ inputs.dtrack_host_name }}
protocol: ${{ inputs.dtrack_protocol }} protocol: ${{ inputs.dtrack_protocol }}
port: ${{ inputs.dtrack_port }} port: ${{ inputs.dtrack_port }}
apikey: ${{ secrets.DTRACK_API_KEY }} apikey: ${{ inpts.dtrack_api_key }}
project: ${{ inputs.dtrack_project_uuid }} project: ${{ inputs.dtrack_project_uuid }}
bomfilename: ${{ inputs.dtrack_bom_file }} bomfilename: ${{ inputs.dtrack_bom_file }}