-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
55 lines (53 loc) · 1.67 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
#!groovy
pipeline {
agent any
stages {
stage('Building') {
steps {
echo 'Stage: Building...'
sh "pipeline/build.sh"
}
}
stage('Testing') {
steps {
echo 'Stage: Testing...'
sh "pipeline/test.sh"
}
}
stage('Publication') {
steps {
echo 'Stage: Publication...'
sh "pipeline/publish.sh"
}
}
stage('Promoting release v5.1') {
when {
branch 'v5.1'
}
stages {
stage('Generating release') {
steps {
sh 'docker tag registry.sonata-nfv.eu:5000/tng-sdk-test:latest registry.sonata-nfv.eu:5000/tng-sdk-test:v5.1'
sh 'docker tag registry.sonata-nfv.eu:5000/tng-sdk-test:latest sonatanfv/tng-sdk-test:v5.1'
sh 'docker push registry.sonata-nfv.eu:5000/tng-sdk-test:v5.1'
sh 'docker push sonatanfv/tng-sdk-test:v5.1'
}
}
}
}
}
post {
success {
emailext(from: "[email protected]",
to: "[email protected]",
subject: "SUCCESS: ${env.JOB_NAME}/${env.BUILD_ID} (${env.BRANCH_NAME})",
body: "${env.JOB_URL}")
}
failure {
emailext(from: "[email protected]",
to: "[email protected]",
subject: "FAILURE: ${env.JOB_NAME}/${env.BUILD_ID} (${env.BRANCH_NAME})",
body: "${env.JOB_URL}")
}
}
}