-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
43 lines (42 loc) · 1.34 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
pipeline {
agent any
stages {
stage('Build') {
steps {
sh "echo Building..."
sh "g++ ./src/addition.cpp -o add.out"
sh "g++ ./src/multiplication.cpp -o mul.out"
sh "g++ ./src/subtraction.cpp -o sub.out"
script {
stash includes: "*.out", name: "builds"
}
}
}
stage('Test') {
steps {
sh "echo Running tests"
sh "g++ ./tests/client_tester.cpp -o tester.out"
sh "echo Testing addition microservice"
sh "ls"
sh "./add.out 33983 &"
sh "./tester.out 33983 10 5"
sh "echo Testing multiplication microservice"
sh "./mul.out 33983 &"
sh "./tester.out 33983 10 5"
sh "echo Testing subtraction microservice"
sh "./sub.out 33983 &"
sh "./tester.out 33983 10 5"
sh "rm ./tester.out"
}
}
stage('Archive') {
steps {
sh "zip -r build_Debian *.out"
archiveArtifacts artifacts: "build_Debian.zip", fingerprint: true
script {
unstash "builds"
}
}
}
}
}