forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschedule-daily.groovy
56 lines (51 loc) · 1.7 KB
/
schedule-daily.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
@Library('apm@current') _
pipeline {
agent none
environment {
NOTIFY_TO = credentials('notify-to')
PIPELINE_LOG_LEVEL = 'INFO'
}
options {
timeout(time: 1, unit: 'HOURS')
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20'))
timestamps()
ansiColor('xterm')
disableResume()
durabilityHint('PERFORMANCE_OPTIMIZED')
}
triggers {
cron('H H(2-3) * * 1-5')
}
stages {
stage('Nighly beats builds') {
steps {
runMacosBuilds(quietPeriodFactor: 2000, branches: ['main', '8.<next-minor>', '8.<minor>', '8.<next-patch>', '7.<minor>'])
runIronbankBuilds(quietPeriodFactor: 100, branches: ['main', '8.<next-minor>', '8.<minor>', '8.<next-patch>', '7.<minor>'])
}
}
}
post {
cleanup {
notifyBuildResult(prComment: false)
}
}
}
def runMacosBuilds(Map args = [:]) {
def branches = getBranchesFromAliases(aliases: args.branches)
def quietPeriod = 0
branches.each { branch ->
// IMPORTANT: ephemeral Orka VMs are not provisioned so, we cannot run builds on daily basis at all.
// build(quietPeriod: quietPeriod, job: "Beats/beats/${branch}", parameters: [booleanParam(name: 'macosTest', value: true)], wait: false, propagate: false)
// Increate the quiet period for the next iteration
quietPeriod += args.quietPeriodFactor
}
}
def runIronbankBuilds(Map args = [:]) {
def branches = getBranchesFromAliases(aliases: args.branches)
def quietPeriod = 0
branches.each { branch ->
build(quietPeriod: quietPeriod, job: "Beats/ironbank-validation-mbp/${branch}", wait: false, propagate: false)
// Increate the quiet period for the next iteration
quietPeriod += args.quietPeriodFactor
}
}