From 4c0801c855bfeb91dcf1563c6741508cb7f43a83 Mon Sep 17 00:00:00 2001 From: garfi Date: Sat, 17 May 2025 22:33:19 +0000 Subject: [PATCH] Actualiser Jenkinsfile --- Jenkinsfile | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 876e87c..737caab 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,24 +10,16 @@ pipeline { stage('Clone git') { steps { // Attention : cela supprimera tous les fichiers dans le répertoire de travail - script { - sh "rm -rf *" - } + sh "rm -rf *" // Clonage du dépôt Git - script { - sh "git clone https://git.zestes.fr/garfi/jenkins-update.git" - } + sh "git clone https://git.zestes.fr/garfi/jenkins-update.git" } } 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 - } + // Construction et exécution de la commande Ansible + sh "ansible-playbook -i ${ANSIBLE_INVENTORY} ${ANSIBLE_PLAYBOOK}" } } }