forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
beats-tester-bc.groovy
47 lines (45 loc) · 1.45 KB
/
beats-tester-bc.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
#!/usr/bin/env groovy
@Library('apm@current') _
pipeline {
agent none
environment {
BASE_DIR = 'src/github.com/elastic/beats'
PIPELINE_LOG_LEVEL = "INFO"
BEATS_TESTER_JOB = 'Beats/beats-tester-mbp/master'
BASE_URL = "https://staging.elastic.co/${params.version}/downloads"
APM_BASE_URL = "${env.BASE_URL}/apm-server"
BEATS_BASE_URL = "${env.BASE_URL}/beats"
VERSION = "${params.version?.split('-')[0]}"
}
options {
timeout(time: 2, unit: 'HOURS')
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20', daysToKeepStr: '30'))
timestamps()
ansiColor('xterm')
disableResume()
durabilityHint('PERFORMANCE_OPTIMIZED')
disableConcurrentBuilds()
}
parameters {
string(name: 'version', defaultValue: '', description: 'Id of the Build Candidate (7.10.0-b55684ff).')
string(name: 'BRANCH_REFERENCE', defaultValue: 'master', description: 'Branch to grab the Groovy script(for test changes).')
}
stages {
stage('Run Beat Tester') {
options { skipDefaultCheckout() }
when {
expression {
return '' != "${VERSION}"
}
}
steps {
build(job: env.BEATS_TESTER_JOB, propagate: true, wait: true,
parameters: [
string(name: 'APM_URL_BASE', value: "${APM_BASE_URL}"),
string(name: 'BEATS_URL_BASE', value: "${BEATS_BASE_URL}"),
string(name: 'VERSION', value: "${VERSION}")
])
}
}
}
}