Some checks failed
Gitea/Status/pipeline/head There was a failure building this commit
27 lines
752 B
Groovy
27 lines
752 B
Groovy
pipeline {
|
|
agent any
|
|
|
|
environment {
|
|
SSH_CREDENTIALS_ID = 'SSH'
|
|
}
|
|
|
|
stages {
|
|
stage('Checkout') {
|
|
steps {
|
|
// Hace un checkout del repositorio Git utilizando las credenciales SSH
|
|
git credentialsId: 'SSH', url: 'ssh://git@gitssh.mainserverprivate.org:8222/vgallegoiz/Status.git', branch: 'main'
|
|
}
|
|
}
|
|
|
|
stage('Pull') {
|
|
steps {
|
|
// Ejecuta un Git Pull en el servidor remoto
|
|
script {
|
|
sshagent(credentials: ['SSH']) {
|
|
sh 'ssh usuario@192.168.1.39 "cd /home/userpi/Status && git pull"'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |