Reset history to latest state
All checks were successful
Updates/open-webui-ollama-docker-deploy/pipeline/head This commit looks good
All checks were successful
Updates/open-webui-ollama-docker-deploy/pipeline/head This commit looks good
This commit is contained in:
67
Jenkinsfile
vendored
Normal file
67
Jenkinsfile
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
pipeline {
|
||||
agent {
|
||||
node { label 'Wrangler1' }
|
||||
}
|
||||
environment {
|
||||
DOCKER_HOST = 'unix:///var/run/docker.sock'
|
||||
OPENAI_TOKEN = credentials('OpenAI-Token')
|
||||
OLLAMA = 'ollama/ollama'
|
||||
OPENWEBUI = 'ghcr.io/open-webui/open-webui:dev'
|
||||
TIKA = 'apache/tika:latest'
|
||||
CHROMADB = 'chromadb/chroma:latest'
|
||||
}
|
||||
stages {
|
||||
stage('Check NVIDIA Driver Version') {
|
||||
steps {
|
||||
script {
|
||||
catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE') {
|
||||
sh 'nvidia-smi --query-gpu=driver_version --format=csv,noheader'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Check Ollama and Open-WebUI Versions (Before Deploy)') {
|
||||
steps {
|
||||
script {
|
||||
catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE') {
|
||||
echo 'Checking Ollama version before deploy:'
|
||||
sh 'docker exec -i ollama ollama -v || echo "Ollama check failed"'
|
||||
|
||||
echo 'Checking Open-WebUI version before deploy:'
|
||||
sh 'docker exec -i openwebui jq -r .version /app/package.json || echo "Open-WebUI check failed"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Deploy with Docker Compose') {
|
||||
steps {
|
||||
script {
|
||||
withCredentials([usernamePassword(credentialsId: 'gitea-oauth-open-webui-client-id-secret', passwordVariable: 'CLIENT_SECRET', usernameVariable: 'CLIENT_ID'), string(credentialsId: 'OpenAI-API-Token', variable: 'OPEN_AI_TOKEN'), usernamePassword(credentialsId: 'ldap-bind-auth-user', passwordVariable: 'AD_BIND_PASSWORD', usernameVariable: 'AD_BIND_USER')]) {
|
||||
sh """
|
||||
COMPOSE_PROJECT_NAME=openwebui CHROMADB=${CHROMADB} TIKA=${TIKA} OLLAMA=${OLLAMA} OPENWEBUI=${OPENWEBUI} docker compose pull
|
||||
COMPOSE_PROJECT_NAME=openwebui CHROMADB=${CHROMADB} TIKA=${TIKA} OLLAMA=${OLLAMA} OPENWEBUI=${OPENWEBUI} docker compose up -d --force-recreate
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Check Ollama and Open-WebUI Versions (After Deploy)') {
|
||||
steps {
|
||||
script {
|
||||
catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE') {
|
||||
echo 'Checking Ollama version after deploy:'
|
||||
sh 'docker exec -i ollama ollama -v || echo "Ollama check failed"'
|
||||
|
||||
echo 'Checking Open-WebUI version after deploy:'
|
||||
sh 'docker exec -i openwebui jq -r .version /app/package.json || echo "Open-WebUI check failed"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
echo 'Pipeline finished.'
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user