2025-09-17 08:38:41 +00:00
|
|
|
pipeline {
|
|
|
|
|
agent any
|
|
|
|
|
|
|
|
|
|
stages {
|
|
|
|
|
stage('Checkout') {
|
|
|
|
|
steps {
|
2025-09-17 10:14:22 +00:00
|
|
|
git url: 'http://8.138.13.251:3000/flyfox/ChatingRoomProject', branch: 'master'
|
2025-09-17 08:38:41 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
stage('Build Docker Image') {
|
|
|
|
|
steps {
|
2025-09-17 10:14:22 +00:00
|
|
|
sh 'docker build --pull -t chatroom:latest .'
|
2025-09-17 08:38:41 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
stage('Deploy to k3s') {
|
|
|
|
|
steps {
|
|
|
|
|
sh '''
|
2025-09-17 12:38:01 +00:00
|
|
|
kubectl --insecure-skip-tls-verify=true delete deployment chatroom-deployment --ignore-not-found=true
|
|
|
|
|
kubectl --insecure-skip-tls-verify=true create deployment chatroom-deployment --image=chatroom:latest
|
|
|
|
|
kubectl --insecure-skip-tls-verify=true expose deployment chatroom-deployment --type=NodePort --port=3030 --target-port=3030
|
2025-09-17 08:38:41 +00:00
|
|
|
'''
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|