-
Notifications
You must be signed in to change notification settings - Fork 10
/
Jenkinsfile
60 lines (59 loc) · 1.72 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!groovy
pipeline {
agent any
stages {
stage('Checkout') {
steps {
echo 'Stage: Checkout...'
checkout scm
}
}
stage('Container build') {
steps {
echo 'Stage: Building...'
sh "pipeline/build/build.sh"
}
}
stage('Unittests') {
steps {
echo 'Stage: Testing...'
sh "pipeline/unittest/test.sh"
}
}
stage('Style check') {
steps {
echo 'Stage: Style check...'
sh "pipeline/checkstyle/check.sh"
}
}
stage('Promoting release v5.0') {
when {
branch 'v5.0'
}
stages {
stage('Generating release') {
steps {
sh 'docker tag registry.sonata-nfv.eu:5000/tng-sdk-benchmark:latest registry.sonata-nfv.eu:5000/tng-sdk-benchmark:v5.0'
sh 'docker tag registry.sonata-nfv.eu:5000/tng-sdk-benchmark:latest sonatanfv/tng-sdk-benchmark:v5.0'
sh 'docker push registry.sonata-nfv.eu:5000/tng-sdk-benchmark:v5.0'
sh 'docker push sonatanfv/tng-sdk-benchmark:v5.0'
}
}
}
}
}
post {
success {
emailext(from: "jenkins@sonata-nfv.eu",
to: "manuel.peuster@upb.de",
subject: "SUCCESS: ${env.JOB_NAME}/${env.BUILD_ID} (${env.BRANCH_NAME})",
body: "${env.JOB_URL}")
}
failure {
emailext(from: "jenkins@sonata-nfv.eu",
to: "manuel.peuster@upb.de",
subject: "FAILURE: ${env.JOB_NAME}/${env.BUILD_ID} (${env.BRANCH_NAME})",
body: "${env.JOB_URL}")
}
}
}