Initial commit - Datalab Lite source code

This commit is contained in:
2026-06-07 23:17:07 +02:00
commit e0b852dd6b
6 changed files with 780 additions and 0 deletions
Vendored
+57
View File
@@ -0,0 +1,57 @@
pipeline {
agent any
stages {
stage('Clone') {
steps {
echo '✅ Code cloné depuis Gitea'
}
}
stage('SonarQube Analysis') {
steps {
withSonarQubeEnv('sonarqube') {
sh '''
sonar-scanner \
-Dsonar.projectKey=datalab-lite \
-Dsonar.projectName="Datalab Lite" \
-Dsonar.sources=. \
-Dsonar.inclusions="**/*.py" \
-Dsonar.python.version=3.11
'''
}
}
}
stage('Quality Gate') {
steps {
waitForQualityGate abortPipeline: false
}
}
stage('Deploy') {
steps {
sh '''
# Mettre à jour le ConfigMap code
kubectl create configmap datalab-lite-code \
--from-file=main.py=main.py \
--from-file=k8s.py=k8s.py \
--from-file=minio_client.py=minio_client.py \
-n datalab-lite \
--dry-run=client -o yaml | kubectl apply -f -
# Mettre à jour le ConfigMap templates
kubectl create configmap datalab-lite-templates \
--from-file=index.html=templates/index.html \
-n datalab-lite \
--dry-run=client -o yaml | kubectl apply -f -
# Redémarrer le pod
kubectl rollout restart deployment datalab-lite -n datalab-lite
echo "✅ Datalab Lite déployé"
'''
}
}
}
post {
success { echo '✅ Pipeline terminé avec succès !' }
failure { echo '❌ Pipeline échoué !' }
}
}