forked from keploy/samples-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
35 lines (28 loc) · 1.26 KB
/
Jenkinsfile
File metadata and controls
35 lines (28 loc) · 1.26 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
pipeline {
agent any
stages {
stage('Keploy Tests') {
steps {
sh '''
# Update and install required packages
sudo apt-get update && sudo apt-get install -y curl kmod linux-headers-generic bpfcc-tools git openjdk-17-jdk
# Clone the repo
git clone -b chore/Integrate-github-cicd https://github.com/Achanandhi-M/samples-java.git
cd samples-java/spring-petclinic/spring-petclinic-rest
# Create directories required by eBPF
sudo mkdir -p /sys/kernel/debug
sudo mkdir -p /sys/kernel/tracing
# Download and install Keploy
curl --silent -O -L https://keploy.io/install.sh && bash install.sh
# Mount debugfs and tracefs if not already mounted
sudo mount -t debugfs nodev /sys/kernel/debug || true
sudo mount -t tracefs nodev /sys/kernel/tracing || true
# Build the app using Maven wrapper
./mvnw package -DskipTests
# Run Keploy test
keploy test -c "java -jar target/spring-petclinic-rest-3.0.2.jar" --delay 20 --language java
'''
}
}
}
}