-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJenkinsfile
46 lines (40 loc) · 1.41 KB
/
Jenkinsfile
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
void run_ats(distribution, version, extra_dev_distribution) {
sh "sudo ./bin/jenkins-ats-wrapper.sh -e '${extra_dev_distribution}' ${distribution} ${version}"
}
pipeline {
agent none
parameters {
string(name:'version', defaultValue:'16.5.1', description:'target version')
string(name:'distribution', defaultValue:'ngfw-release-16.5', description:'target distribution')
string(name:'extra_dev_distribution', defaultValue:env.BRANCH_NAME, description:'extra dev distribution (for PRs)')
}
triggers {
parameterizedCron('''
0 23 * * *
0 01 * * * %version=16.4.0;distribution=ngfw-release-16.4
''')
}
stages {
stage('Run ATS') {
agent { label 'podman' }
when {
expression {
return (!(currentBuild.buildCauses[0].shortDescription =~ "timer") || env.BRANCH_NAME == 'master')
}
}
steps {
run_ats(params.distribution, params.version, params.extra_dev_distribution)
}
post {
changed {
script {
// set result before pipeline ends, so emailer sees it
currentBuild.result = currentBuild.currentResult
}
emailext(to:'seb@untangle.com', subject:"${env.JOB_NAME} #${env.BUILD_NUMBER}: ${currentBuild.result}", body:"${env.BUILD_URL}")
// slackSend(channel:"#team_engineering", message:"${env.JOB_NAME} #${env.BUILD_NUMBER}: ${currentBuild.result} at ${env.BUILD_URL}")
}
}
}
}
}