diff --git a/tests/API-dhcp/Jenkinsfile b/tests/API-dhcp/Jenkinsfile index 8c41494..1c3d6cf 100644 --- a/tests/API-dhcp/Jenkinsfile +++ b/tests/API-dhcp/Jenkinsfile @@ -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' }