Remove duplicate Checkout stage from Jenkinsfile

This commit is contained in:
FOXeverx 2025-09-17 18:14:22 +08:00
parent 9ee9eb4ec3
commit d58aab9175
1 changed files with 5 additions and 6 deletions

11
Jenkinsfile vendored
View File

@ -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
'''
}
}