From 83aac7cd51379b20d5b9d62a2802414068693e6e Mon Sep 17 00:00:00 2001 From: dl Date: Fri, 16 May 2025 16:44:00 +0500 Subject: [PATCH] Jenkins file was added for test branch --- Jenkinsfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..119445e --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,21 @@ +pipeline { + agent { label any } + + stages { + stage('Stop and Remove Existing Container') { + steps { + sh ''' + docker stop fastapi_hello_time || true + docker rm fastapi_hello_time || true + docker-compose down || true + ''' + } + } + + stage('Build and Run Container') { + steps { + sh ''' + docker-compose up --build -d + ''' + } + }