Téléverser les fichiers vers "/"
This commit is contained in:
31
Jenkinsfile
vendored
Normal file
31
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
ANSIBLE_INVENTORY = 'inventory.ini'
|
||||
ANSIBLE_PLAYBOOK = 'update_debian.yml'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
git 'https://git.zestes.fr/garfi/jenkins-update.git'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Run Ansible Playbook') {
|
||||
steps {
|
||||
script {
|
||||
def ansibleCommand = "ansible-playbook -i ${ANSIBLE_INVENTORY} ${ANSIBLE_PLAYBOOK}"
|
||||
sh ansibleCommand
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
cleanWs()
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user