-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJenkinsfile
More file actions
40 lines (39 loc) · 1.2 KB
/
Jenkinsfile
File metadata and controls
40 lines (39 loc) · 1.2 KB
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
pipeline {
agent any
stages {
stage('Build Project Image') {
steps {
script {
echo 'Building the cl-freellock project Docker image...'
// Use sudo to run docker commands
sh 'sudo docker build -t cl-freelock-app:latest .'
}
}
}
stage('Run Tests') {
steps {
script {
echo 'Running tests inside the container...'
// Use sudo to run docker commands
sh 'sudo docker run --rm cl-freelock-app:latest'
}
}
}
stage('Run Benchmarks') {
steps {
script {
echo 'Running benchmarks inside the container...'
// Use sudo to run docker commands
sh 'sudo docker run --rm cl-freelock-app:latest make benchmark'
}
}
}
}
post {
always {
echo 'Pipeline finished. Cleaning up build image...'
// Use sudo to run docker commands
sh 'sudo docker rmi cl-freelock-app:latest || true'
}
}
}