forked from opensearch-project/opensearch-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
standardReleasePipeline.groovy
39 lines (38 loc) · 1.01 KB
/
standardReleasePipeline.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
/** A standard release pipeline for OpenSearch projects */
void call(Map args = [:], Closure body) {
pipeline {
agent any
// Note; testing this on custom jenkins instance that doesn't
// have docker installed
// {
// docker {
// label 'AL2-X64'
// image args.overrideDockerImage ?: 'alpine:latest'
// alwaysPull true
// }
// }
options {
timeout(time: 1, unit: 'HOURS')
}
stages{
stage("Release") {
steps {
script {
body()
}
}
}
}
post {
always {
script {
postCleanup()
// Update to also do docker cleanup too
if (args?.cleanup instanceof Closure) {
args.cleanup()
}
}
}
}
}
}