pipeline { agent any stages { stage('Checkout') { steps { git url: 'http://8.138.13.251:3000/flyfox/ChatRoomProject.git', branch: 'master' } } stage('Build Docker Image') { steps { script { docker.build("chatroom:latest", ".") } } } stage('Deploy to k3s') { steps { sh ''' kubectl delete deployment chatroom --ignore-not-found kubectl apply -f k8s-deployment.yaml ''' } } } }