diff --git a/Jenkinsfile b/Jenkinsfile index 5d4b335..984fbe3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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() } }