From 854b0c5efea83248d80c1d24081c5000aa173432 Mon Sep 17 00:00:00 2001 From: Mike Olund Date: Fri, 28 Apr 2017 14:45:40 -0700 Subject: [PATCH] Only keep the last 10 builds in Jenkins --- openshift/jenkins/build-and-deploy-to-dev | 2 ++ openshift/jenkins/deploy-to-prod | 2 ++ openshift/jenkins/deploy-to-test | 2 ++ 3 files changed, 6 insertions(+) diff --git a/openshift/jenkins/build-and-deploy-to-dev b/openshift/jenkins/build-and-deploy-to-dev index 934882fb..0e4f27bd 100644 --- a/openshift/jenkins/build-and-deploy-to-dev +++ b/openshift/jenkins/build-and-deploy-to-dev @@ -1,5 +1,7 @@ node('master') { +properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10']]]) + stage 'buildInTools' openshiftBuild(namespace: 'jag-csb-edivorce-tools', buildConfig: 'edivorce-django', showBuildLogs: 'true') diff --git a/openshift/jenkins/deploy-to-prod b/openshift/jenkins/deploy-to-prod index 125f3ccb..a15875c6 100644 --- a/openshift/jenkins/deploy-to-prod +++ b/openshift/jenkins/deploy-to-prod @@ -1,5 +1,7 @@ node('master') { +properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10']]]) + stage 'deployInProd' openshiftTag(namespace: 'jag-csb-edivorce-tools', sourceStream: 'edivorce-django', sourceTag: 'latest', destinationNamespace: 'jag-csb-edivorce-tools', destinationStream: 'edivorce-django', destinationTag: 'deploy-to-prod') openshiftDeploy(namespace: 'jag-csb-edivorce-prod', deploymentConfig: 'edivorce-django') diff --git a/openshift/jenkins/deploy-to-test b/openshift/jenkins/deploy-to-test index 058e3123..b75dc347 100644 --- a/openshift/jenkins/deploy-to-test +++ b/openshift/jenkins/deploy-to-test @@ -1,5 +1,7 @@ node('master') { +properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10']]]) + stage 'deployInTest' openshiftTag(namespace: 'jag-csb-edivorce-tools', sourceStream: 'edivorce-django', sourceTag: 'latest', destinationNamespace: 'jag-csb-edivorce-tools', destinationStream: 'edivorce-django', destinationTag: 'deploy-to-test') openshiftDeploy(namespace: 'jag-csb-edivorce-test', deploymentConfig: 'edivorce-django')