ogdhcp/tests/API-dhcp/Jenkinsfile

42 lines
1.1 KiB
Groovy

pipeline {
agent {
node {
label 'jenkins-slave'
}
}
environment {
ESXI_PASS = credentials('VI_PASSWORD')
PATH = "/home/qindel/bin/ovftool:${env.PATH}"
}
stages {
stage('Prepare environment') {
steps {
dir ('tests/API-dhcp') {
echo "Install vagrant plugin"
sh 'vagrant plugin install vagrant-vmware-esxi'
echo "Deploy API server for DHCP with Vagrant"
sh 'vagrant up --provider=vmware_esxi --provision'
}
}
}
stage('Check Installation') {
steps {
echo 'Testing..'
}
}
stage ('Run API tests') {
steps {
echo 'Running API tests'
}
}
stage('Clean up') {
steps {
dir ('tests/API-dhcp') {
echo "Destroy API server for DHCP with Vagrant"
sh 'vagrant destroy -f'
}
}
}
}
}