Remove duplicate Checkout stage from Jenkinsfile
This commit is contained in:
parent
9ee9eb4ec3
commit
d58aab9175
|
|
@ -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
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue