Actualiser Jenkinsfile

This commit is contained in:
garfi 2025-05-17 22:33:19 +00:00
parent ffc3e2b539
commit 4c0801c855

16
Jenkinsfile vendored
View File

@ -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}"
}
}
}