diff --git a/Jenkinsfile b/Jenkinsfile index 7d544222a4304a34206325edbea4281970c59b4d..10ce12b72ec187c641a6164bccd5fd909aecf197 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -38,4 +38,10 @@ node('master') { } } -properties ([[$class: 'org.jenkinsci.plugins.workflow.job.properties.BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '25']]]) +properties([[ + $class: 'org.jenkinsci.plugins.workflow.job.properties.BuildDiscarderProperty', + strategy: [$class: 'LogRotator', + artifactDaysToKeepStr: '', + artifactNumToKeepStr: '5', + daysToKeepStr: '', + numToKeepStr: '25']]]) diff --git a/scripts/jenkins/clang.groovy b/scripts/jenkins/clang.groovy index e3267fdc50bab1901e7f8d15c4bd7f1175b54ad0..a9060b38e91239f3767e0b0017a75f0011f25692 100644 --- a/scripts/jenkins/clang.groovy +++ b/scripts/jenkins/clang.groovy @@ -37,3 +37,11 @@ node('docker') { 'ogs/scripts/jenkins/clang-log-parser.rules') post.cleanup() } + +properties([[ + $class: 'org.jenkinsci.plugins.workflow.job.properties.BuildDiscarderProperty', + strategy: [$class: 'LogRotator', + artifactDaysToKeepStr: '', + artifactNumToKeepStr: '5', + daysToKeepStr: '', + numToKeepStr: '25']]]) diff --git a/scripts/jenkins/coverage.groovy b/scripts/jenkins/coverage.groovy index e3341cce7e6b06178a98deac152389dc91ecac73..7086b147396ca544f4204e96d0a40a01ae303b03 100644 --- a/scripts/jenkins/coverage.groovy +++ b/scripts/jenkins/coverage.groovy @@ -25,5 +25,10 @@ def build(buildDir, cmakeOptions, target) { sh "cd ${buildDir} && make -j \$(nproc) ${target}" } -properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', - artifactDaysToKeepStr: '', artifactNumToKeepStr: '1', daysToKeepStr: '', numToKeepStr: '5']]]) +properties([[ + $class: 'org.jenkinsci.plugins.workflow.job.properties.BuildDiscarderProperty', + strategy: [$class: 'LogRotator', + artifactDaysToKeepStr: '', + artifactNumToKeepStr: '1', + daysToKeepStr: '', + numToKeepStr: '5']]]) diff --git a/scripts/jenkins/deploy-post.groovy b/scripts/jenkins/deploy-post.groovy index 06b976b966aa015bb147c0c05525f5e13b4318ac..72092dcaee969fa2bf585b6f97e5e36fb203f7bb 100644 --- a/scripts/jenkins/deploy-post.groovy +++ b/scripts/jenkins/deploy-post.groovy @@ -14,7 +14,10 @@ node('master') { 'Content-Type', value: 'Application/json']]]) } -properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', +properties([[ + $class: 'org.jenkinsci.plugins.workflow.job.properties.BuildDiscarderProperty', + strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', - daysToKeepStr: '', numToKeepStr: '10']]]) + daysToKeepStr: '', + numToKeepStr: '10']]]) diff --git a/scripts/jenkins/deploy.groovy b/scripts/jenkins/deploy.groovy index 0fc87d5f62a098ea5586b692018764ed8379dcf8..70255fbba9e18f3a9f1c6b4cad7134e890b23b90 100644 --- a/scripts/jenkins/deploy.groovy +++ b/scripts/jenkins/deploy.groovy @@ -3,13 +3,17 @@ node('master') { stage 'Deploy to S3' deleteDir() - step([$class: 'CopyArtifact', fingerprintArtifacts: true, flatten: true, - projectName: 'OGS-6/ufz/master']) + step([$class: 'CopyArtifact', + fingerprintArtifacts: true, flatten: true, + projectName: 'OGS-6/ufz/master', + selector: [$class: 'LastCompletedBuildSelector']]) s3upload('*') build job: 'OGS-6/Deploy-Post', wait: false } -properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', +properties([[ + $class: 'org.jenkinsci.plugins.workflow.job.properties.BuildDiscarderProperty', + strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '',