Jenkins + Minio + Prometheus + Grafana v1

This commit is contained in:
2026-09-01 13:42:14 +00:00
commit 05a197b0d0
21 changed files with 2256 additions and 0 deletions
@@ -0,0 +1,44 @@
pipeline {
agent none
parameters {
string(name: 'NODO', defaultValue: '', description: 'Nombre exacto del agente SCO (ej: ralph-yabucoa-sco05)')
}
stages {
stage('Registro de parámetros') {
agent none
when { expression { params.NODO == null } }
steps {
echo 'Primer build: Jenkins está registrando los parámetros de este Jenkinsfile. No se ejecuta nada. Volvé a correr el job con "Build with Parameters".'
script { currentBuild.result = 'NOT_BUILT' }
}
}
stage('Preparar scripts') {
agent { label 'built-in' }
when { expression { params.NODO != null } }
steps {
sh 'cp /opt/history/history.sh .'
stash name: 'scripts', includes: 'history.sh'
}
}
stage('Reprocesar historial') {
agent { label 'built-in' }
when { expression { params.NODO != null } }
steps {
script {
if (!params.NODO?.trim()) {
error "El parámetro NODO es obligatorio"
}
def target = params.NODO.trim()
node(target) {
unstash 'scripts'
timeout(time: 30, unit: 'MINUTES') {
sh 'bash history.sh'
}
}
}
}
}
}
}