Actualiser Jenkinsfile
This commit is contained in:
parent
ffc3e2b539
commit
4c0801c855
12
Jenkinsfile
vendored
12
Jenkinsfile
vendored
@ -10,24 +10,16 @@ pipeline {
|
|||||||
stage('Clone git') {
|
stage('Clone git') {
|
||||||
steps {
|
steps {
|
||||||
// Attention : cela supprimera tous les fichiers dans le répertoire de travail
|
// 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
|
// 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') {
|
stage('Run Ansible Playbook') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
// Construction et exécution de la commande Ansible
|
||||||
// Construction de la commande Ansible
|
sh "ansible-playbook -i ${ANSIBLE_INVENTORY} ${ANSIBLE_PLAYBOOK}"
|
||||||
def ansibleCommand = "ansible-playbook -i ${ANSIBLE_INVENTORY} ${ANSIBLE_PLAYBOOK}"
|
|
||||||
// Exécution de la commande Ansible
|
|
||||||
sh ansibleCommand
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user