mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-02 02:11:19 +08:00
Make pipeline job options consistent
Set a consistent set of options on Jenkins pipeline jobs. This includes timestamps, reasonable timeouts, saving only the last 10 builds (to avoid filling up the disk of the Jenkins master), disabling concurrent builds (to avoid hitting quota limits), and skipping the default checkout (all jobs that need the source call checkout() explicitly).
This commit is contained in:
@@ -42,6 +42,7 @@ pipeline {
|
||||
timestamps()
|
||||
timeout(time: 120, unit: 'MINUTES')
|
||||
buildDiscarder(logRotator(numToKeepStr: '10'))
|
||||
disableConcurrentBuilds()
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
environment {
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
// Use scripted syntax because CIBuildTrigger currently doesn't support the declarative syntax
|
||||
properties([
|
||||
timestamps(),
|
||||
timeout(time: 30, unit: 'MINUTES'),
|
||||
buildDiscarder(logRotator(numToKeepStr: '10')),
|
||||
disableConcurrentBuilds(),
|
||||
skipDefaultCheckout(),
|
||||
pipelineTriggers([
|
||||
// example: https://github.com/jenkinsci/jms-messaging-plugin/blob/9b9387c3a52f037ba0d019c2ebcf2a2796fc6397/src/test/java/com/redhat/jenkins/plugins/ci/integration/AmqMessagingPluginIntegrationTest.java
|
||||
[$class: 'CIBuildTrigger',
|
||||
|
||||
@@ -38,6 +38,9 @@ pipeline {
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 30, unit: 'MINUTES')
|
||||
buildDiscarder(logRotator(numToKeepStr: '10'))
|
||||
disableConcurrentBuilds()
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
environment {
|
||||
PIPELINE_NAMESPACE = readFile(file: '/run/secrets/kubernetes.io/serviceaccount/namespace').trim()
|
||||
|
||||
@@ -41,6 +41,7 @@ pipeline {
|
||||
timestamps()
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
buildDiscarder(logRotator(numToKeepStr: '10'))
|
||||
disableConcurrentBuilds()
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
environment {
|
||||
|
||||
@@ -123,6 +123,10 @@ objects:
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
buildDiscarder(logRotator(numToKeepStr: '10'))
|
||||
disableConcurrentBuilds()
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
environment {
|
||||
PIPELINE_NAMESPACE = readFile('/run/secrets/kubernetes.io/serviceaccount/namespace').trim()
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
// Use scripted syntax because CIBuildTrigger currently doesn't support the declarative syntax
|
||||
properties([
|
||||
timestamps(),
|
||||
timeout(time: 30, unit: 'MINUTES'),
|
||||
buildDiscarder(logRotator(numToKeepStr: '10')),
|
||||
disableConcurrentBuilds(),
|
||||
skipDefaultCheckout(),
|
||||
pipelineTriggers([
|
||||
// example: https://github.com/jenkinsci/jms-messaging-plugin/blob/9b9387c3a52f037ba0d019c2ebcf2a2796fc6397/src/test/java/com/redhat/jenkins/plugins/ci/integration/AmqMessagingPluginIntegrationTest.java
|
||||
[$class: 'CIBuildTrigger',
|
||||
|
||||
Reference in New Issue
Block a user