diff --git a/Jenkinsfile b/Jenkinsfile index 6b1e0f2..30cd9d6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,23 +4,22 @@ pipeline { stages { stage('Checkout') { steps { - git url: 'http://8.138.13.251:3000/flyfox/ChatRoomProject.git', branch: 'master' + git url: 'http://8.138.13.251:3000/flyfox/ChatingRoomProject', branch: 'master' } } stage('Build Docker Image') { steps { - script { - docker.build("chatroom:latest", ".") - } + sh 'docker build --pull -t chatroom:latest .' } } stage('Deploy to k3s') { steps { sh ''' - kubectl delete deployment chatroom --ignore-not-found - kubectl apply -f k8s-deployment.yaml + kubectl delete deployment chatroom-deployment --ignore-not-found=true + kubectl create deployment chatroom-deployment --image=chatroom:latest + kubectl expose deployment chatroom-deployment --type=NodePort --port=3030 --target-port=3030 ''' } }