refacto: switch to new vps and jenkins integration

This commit is contained in:
2026-01-08 16:41:52 +00:00
parent 6db43a1810
commit 9460c0ce83
8 changed files with 161 additions and 97 deletions

49
Jenkinsfile vendored Executable file
View File

@@ -0,0 +1,49 @@
pipeline {
agent any
stages {
stage('Check git...') {
steps {
checkout scm
}
}
stage('Build') {
steps {
echo "Build Caddy with cache plugin..."
sh "docker compose build --pull"
}
}
stage('Deploy') {
steps {
echo "Deploy new reverse proxy..."
sh "docker compose up -d"
}
}
stage('Check module...') {
steps {
script {
// Ask caddy to list modules
def modules = sh(script: "docker exec caddy-reverse-proxy caddy list-modules", returnStdout: true)
if (modules.contains('http.handlers.cache')) {
echo "Cache module activated"
} else {
error "Error : can't find cache module"
}
}
}
}
}
post {
always {
echo "Clean unused image..."
sh "docker image prune -f"
}
success {
echo "Success !"
}
failure {
echo "Failed."
}
}
}