Actualiser Jenkinsfile
This commit is contained in:
parent
3fa36cda4d
commit
3aaefd36b9
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@ -9,11 +9,25 @@ pipeline {
|
|||||||
stages {
|
stages {
|
||||||
stage('Clone git') {
|
stage('Clone git') {
|
||||||
steps {
|
steps {
|
||||||
|
// Attention : cela supprimera tous les fichiers dans le répertoire de travail
|
||||||
|
sh "rm -rf *"
|
||||||
// Clonage du dépôt Git
|
// 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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
// Nettoyage de l'espace de travail
|
// Nettoyage de l'espace de travail
|
||||||
|
Loading…
x
Reference in New Issue
Block a user