Update Jenkinsfile

Signed-off-by: Riz Urian <98958099+rizjosel@users.noreply.github.com>
This commit is contained in:
Riz Urian 2025-12-27 10:36:14 +08:00 committed by GitHub
parent b8158278cf
commit ea41353777
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

16
Jenkinsfile vendored
View file

@ -30,22 +30,6 @@ pipeline {
sh "docker build -t ${IMAGE_NAME} ."
}
}
stage('Test Docker Image') {
steps {
// Run container for testing
sh "docker run -d --name ${APP_NAME}-test -p 8080:8080 ${IMAGE_NAME}"
// Wait for app to start
sh "sleep 10"
// Health check - if curl fails, this step will fail and stop the pipeline
sh "curl -f http://localhost:8080/actuator/health"
// Stop and remove test container
sh "docker stop ${APP_NAME}-test && docker rm ${APP_NAME}-test"
}
}
stage('Docker Push') {
steps {