-
Notifications
You must be signed in to change notification settings - Fork 19
/
Jenkinsfile
54 lines (43 loc) · 1.13 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
#!groovy
pipeline {
agent any
stages {
stage('Checkout') {
steps {
echo "Checkout branch `${env.GIT_BRANCH}` @ ${env.GIT_URL}"
checkout scm
}
}
stage('Build') {
steps {
echo "Build ${env.JOB_NAME} #${env.BUILD_ID} on ${env.JENKINS_URL}"
sh 'mkdir -p build'
dir('build') {
sh "cmake .. -DCMAKE_INSTALL_PREFIX=${env.WORKSPACE}/dist"
sh 'make'
}
}
}
stage('Test') {
steps {
echo "Test ${env.JOB_NAME} #${env.BUILD_ID}"
dir('build') {
sh 'make test'
}
}
}
stage('Deploy') {
steps {
echo "Deploy ${env.JOB_NAME} #${env.BUILD_ID}"
dir('build') {
sh 'make install'
}
}
}
stage('Cleanup') {
steps {
echo "Cleanup ${env.JOB_NAME} #${env.BUILD_ID}"
}
}
}
}