Actualiser Jenkinsfile

This commit is contained in:
garfi 2025-05-17 21:58:39 +00:00
parent c1117391cd
commit e406e1979c

5
Jenkinsfile vendored
View File

@ -9,7 +9,7 @@ pipeline {
stages {
stage('Clone git') {
steps {
sh "rm -rf *"
// Clonage du dépôt Git
sh "git clone https://git.zestes.fr/garfi/jenkins-update.git"
}
}
@ -17,7 +17,9 @@ pipeline {
stage('Run Ansible Playbook') {
steps {
script {
// Construction de la commande Ansible
def ansibleCommand = "ansible-playbook -i ${ANSIBLE_INVENTORY} ${ANSIBLE_PLAYBOOK}"
// Exécution de la commande Ansible
sh ansibleCommand
}
}
@ -26,6 +28,7 @@ pipeline {
post {
always {
// Nettoyage de l'espace de travail
cleanWs()
}
}