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,50 +1,47 @@
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_protocol:
# dtrack.muehlencord.de description: 'the protocol to connect to the dtrack server, default to https'
dtrack_protocol: required: false
required: false default: "https"
type: string dtrack_port:
default: "https" description: 'the port to connect to the dtrack server to, defaults to 443'
dtrack_port: required: false
required: false default: "443"
type: string dtrack_bom_file:
default: "443" description: 'the location of the bom file'
dtrack_bom_file: required: true
required: true dtrack_project_uuid:
type: string description: 'the dtrack project id to use'
dtrack_project_uuid: required: true
required: true sonar_token:
type: string description: 'the ssh key to use for checkout'
secrets: required: true
SSH_PRIVATE_KEY: dtrack_api_key:
required: true description: 'the ssh key to use for checkout'
SONAR_TOKEN: required: true
required: true
DTRACK_API_KEY:
required: true
runs: runs:
using: 'composite' using: 'composite'
@@ -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 }}