Skip to content
Snippets Groups Projects
Commit c7092288 authored by Tobias Bruns's avatar Tobias Bruns
Browse files

reorder build to keep things running

parent 9a954244
No related branches found
No related tags found
1 merge request!3Ozg 6988 add reporting
...@@ -106,26 +106,10 @@ pipeline { ...@@ -106,26 +106,10 @@ pipeline {
} }
} }
stage ('Deploy SBOM to DependencyTrack') {
steps {
script {
IMAGE_TAG = buildVersionName()
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
withCredentials([string(credentialsId: 'dependency-track-api-key', variable: 'API_KEY')]) {
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
sh "mvn --no-transfer-progress -s $MAVEN_SETTINGS io.github.pmckeown:dependency-track-maven-plugin:upload-bom -Ddependency-track.apiKey=$API_KEY -Ddependency-track.projectVersion=${IMAGE_TAG} -Ddependency-track.dependencyTrackBaseUrl=https://dependency-track.ozg-sh.de"
}
}
}
}
}
}
stage('Build and publish Docker image') { stage('Build and publish Docker image') {
steps { steps {
script { script {
IMAGE_TAG = buildVersionName()
FAILED_STAGE=env.STAGE_NAME FAILED_STAGE=env.STAGE_NAME
} }
...@@ -189,6 +173,23 @@ pipeline { ...@@ -189,6 +173,23 @@ pipeline {
} }
} }
} }
stage ('Deploy SBOM to DependencyTrack') {
steps {
script {
IMAGE_TAG = buildVersionName()
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
withCredentials([string(credentialsId: 'dependency-track-api-key', variable: 'API_KEY')]) {
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
sh "mvn --no-transfer-progress -s $MAVEN_SETTINGS io.github.pmckeown:dependency-track-maven-plugin:upload-bom -Ddependency-track.apiKey=$API_KEY -Ddependency-track.projectVersion=${IMAGE_TAG} -Ddependency-track.dependencyTrackBaseUrl=https://dependency-track.ozg-sh.de"
}
}
}
}
}
}
} }
post { post {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment