-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
39 lines (35 loc) · 891 Bytes
/
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
pipeline {
agent any
options {
buildDiscarder(logRotator(numToKeepStr: '50'))
}
parameters {
string(name: 'version',
defaultValue: 'dev',
description: 'version to build (dev, nightly, nightly-10, sprint, 8.0, 10.0, 11.2, ...)',
trim: true)
booleanParam(name: 'triggerDockerScout', defaultValue: true)
}
stages {
stage('build') {
steps {
script {
def version = params.version;
currentBuild.description = "version: ${version}"
docker.withRegistry('', 'docker.io') {
sh "./build.sh ${version} --push"
}
}
}
}
}
post {
success {
script {
if (params.triggerDockerScout) {
build job: 'docker-image_docker-scout/master', wait: false, parameters: [string(name: 'version', value: "${params.version}")]
}
}
}
}
}