Add CycloneDX Plugin in Gradle Build and Report in CI

This commit is contained in:
kevin.tumma@knecon.com 2024-03-05 11:33:43 +01:00
parent bc334b9760
commit ef4d501f19
2 changed files with 4 additions and 10 deletions

View File

@ -5,19 +5,12 @@ include:
ref: 'main'
file: 'ci-templates/gradle_java.yml'
deploy:
bom:
stage: deploy
tags:
- dind
script:
- echo "Building with gradle version ${BUILDVERSION}"
- gradle -Pversion=${BUILDVERSION} publish
- gradle bootBuildImage --publishImage -PbuildbootDockerHostNetwork=true -Pversion=${BUILDVERSION}
- echo "BUILDVERSION=$BUILDVERSION" >> version.env
- echo "Publishing the generated BOM"
artifacts:
reports:
dotenv: version.env
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH =~ /^release/
- if: $CI_COMMIT_TAG
cyclonedx: persistence-service/persistence-service-v1/persistence-service-server-v1/build/reports/*.json

View File

@ -7,6 +7,7 @@ plugins {
id("io.spring.dependency-management") version "1.1.3"
id("org.sonarqube") version "4.4.1.3373"
id("io.freefair.lombok") version "8.4"
id ("org.cyclonedx.bom") version "1.8.2"
}
configurations {