You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2021/04/14 16:59:59 UTC
[maven-jenkins-lib] branch master updated: [chore] Build master
branches every month
This is an automated email from the ASF dual-hosted git repository.
rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-jenkins-lib.git
The following commit(s) were added to refs/heads/master by this push:
new 1045d73 [chore] Build master branches every month
1045d73 is described below
commit 1045d73ec7f628e6c5fafce19fb4a90211b8af58
Author: Arnaud HeĢritier <ah...@apache.org>
AuthorDate: Mon Apr 12 21:41:32 2021 +0200
[chore] Build master branches every month
---
vars/asfMavenTlpPlgnBuild.groovy | 12 +++++++-----
vars/asfMavenTlpStdBuild.groovy | 12 +++++++-----
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/vars/asfMavenTlpPlgnBuild.groovy b/vars/asfMavenTlpPlgnBuild.groovy
index 5ff67f7..894b55c 100644
--- a/vars/asfMavenTlpPlgnBuild.groovy
+++ b/vars/asfMavenTlpPlgnBuild.groovy
@@ -22,14 +22,16 @@
def call(Map params = [:]) {
Map taskContext = [:]
try {
- // set build retention time first
- def buildRetention
+ def buildProperties = []
if (env.BRANCH_NAME == 'master') {
- buildRetention = buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '15', numToKeepStr: '10'))
+ // set build retention time first
+ buildProperties.add(buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '15', numToKeepStr: '10')))
+ // ensure a build is done every month
+ buildProperties.add(pipelineTriggers([cron('@monthly')]))
} else {
- buildRetention = buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '2', daysToKeepStr: '7', numToKeepStr: '3'))
+ buildProperties.add(buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '2', daysToKeepStr: '7', numToKeepStr: '3')))
}
- properties([buildRetention])
+ properties(buildProperties)
// now determine the matrix of parallel builds
def oses = params.containsKey('os') ? params.os : ['linux', 'windows']
diff --git a/vars/asfMavenTlpStdBuild.groovy b/vars/asfMavenTlpStdBuild.groovy
index 314ed24..e8dd547 100644
--- a/vars/asfMavenTlpStdBuild.groovy
+++ b/vars/asfMavenTlpStdBuild.groovy
@@ -22,14 +22,16 @@
def call(Map params = [:]) {
def failingFast = null
try {
- // set build retention time first
- def buildRetention
+ def buildProperties = []
if (env.BRANCH_NAME == 'master') {
- buildRetention = buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '15', numToKeepStr: '10'))
+ // set build retention time first
+ buildProperties.add(buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '15', numToKeepStr: '10')))
+ // ensure a build is done every month
+ buildProperties.add(pipelineTriggers([cron('@monthly')]))
} else {
- buildRetention = buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '2', daysToKeepStr: '7', numToKeepStr: '3'))
+ buildProperties.add(buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '2', daysToKeepStr: '7', numToKeepStr: '3')))
}
- properties([buildRetention])
+ properties(buildProperties)
// now determine the matrix of parallel builds
def oses = params.containsKey('os') ? params.os : ['linux', 'windows']