removed Workspace Check and added Log Rotation
All checks were successful
Tests / Declarative: Post Actions passed: 1
csharp-secdevops-pipeline-pod/pipeline/head This commit looks good

This commit is contained in:
2026-05-05 15:09:24 +02:00
parent 7f4b77cb0d
commit 5454f03ddb

19
Jenkinsfile vendored
View File

@@ -21,6 +21,12 @@ pipeline {
} }
} }
options {
// Log-Rotation: Bewahre nur die letzten 10 Builds auf
// und lösche Berichte/Artefakte von Builds, die älter als 7 Tage sind.
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10', daysToKeepStr: '7'))
}
stages { stages {
stage('Checkout Source') { stage('Checkout Source') {
steps { steps {
@@ -66,19 +72,6 @@ pipeline {
} }
} }
stage('Workspace Check') {
steps {
container('dotnet8') {
// Listet alle Dateien auf.
// Wenn du hier Ordner wie 'bin' oder 'obj' siehst, BEVOR dotnet build lief,
// dann bleibt der Workspace erhalten.
sh 'ls -R'
// Optional: Erstelle eine Testdatei, um es beim nächsten Mal zu sehen
}
}
}
stage('Set Build Name') { stage('Set Build Name') {
steps { steps {
script { script {