Improve plugin installation

nginx_conf
Nicolas Arenas 2024-10-01 14:12:34 +02:00
parent 3793256ae8
commit 0e462f02cd
1 changed files with 8 additions and 1 deletions

View File

@ -18,7 +18,14 @@ pipeline {
steps {
dir ('tests/API-dhcp') {
echo "Install vagrant plugin"
sh 'vagrant plugin install vagrant-vmware-esxi'
sh '''
if ! vagrant plugin list | grep -q vagrant-vmware-esxi; then
echo "Vagrant plugin vagrant-vmware-esxi not found. Installing..."
vagrant plugin install vagrant-vmware-esxi
else
echo "Vagrant plugin vagrant-vmware-esxi is already installed."
fi
'''
echo "Deploy API server for DHCP with Vagrant"
sh 'vagrant up --provider=vmware_esxi --provision'
}