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