Remove duplicate Checkout stage from Jenkinsfile
This commit is contained in:
parent
9ee9eb4ec3
commit
d58aab9175
|
|
@ -4,23 +4,22 @@ pipeline {
|
||||||
stages {
|
stages {
|
||||||
stage('Checkout') {
|
stage('Checkout') {
|
||||||
steps {
|
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') {
|
stage('Build Docker Image') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
sh 'docker build --pull -t chatroom:latest .'
|
||||||
docker.build("chatroom:latest", ".")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Deploy to k3s') {
|
stage('Deploy to k3s') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
kubectl delete deployment chatroom --ignore-not-found
|
kubectl delete deployment chatroom-deployment --ignore-not-found=true
|
||||||
kubectl apply -f k8s-deployment.yaml
|
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