Skip to content

Commit 80465e4

Browse files
committed
jenkins-file-command-added
1 parent 40380f6 commit 80465e4

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

Jenkinsfile

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,30 @@ pipeline {
33
stages {
44
stage('Keploy Tests') {
55
steps {
6-
// Clone the git repository
76
git branch: 'chore/Integrate-github-cicd', url: 'https://github.com/Achanandhi-M/samples-java.git'
8-
// switch to the directory and run test
97
dir('spring-petclinic/spring-petclinic-rest') {
10-
sh """
8+
sh '''
119
# Download and install Keploy binary
1210
curl --silent -O -L https://keploy.io/install.sh && bash install.sh
1311
1412
which keploy
1513
16-
# keploy test -c "docker compose up" --container-name "ginMongoApp" --delay 15
17-
#sudo keploy test -c \"docker-compose up\" --container-name \"javaApp\" -t \"test-set-0" --build-delay 50 --delay 20 --debug
18-
docker-compose up
19-
"""
14+
# Set env variables to fix docker run volume issues
15+
export KEPLOY_CONFIG_DIR="$(pwd)/.keploy-config"
16+
export KEPLOY_TEST_DIR="$(pwd)/.keploy"
17+
18+
mkdir -p "$KEPLOY_CONFIG_DIR" "$KEPLOY_TEST_DIR"
19+
20+
# Run Keploy test with proper volume mounts
21+
sudo keploy test -c "docker-compose up" \
22+
--container-name "javaApp" \
23+
-t "test-set-0" \
24+
--build-delay 50 \
25+
--delay 20 \
26+
--debug
27+
'''
2028
}
2129
}
2230
}
2331
}
24-
}
32+
}

0 commit comments

Comments
 (0)