Skip to content

Commit

Permalink
Removing test files
Browse files Browse the repository at this point in the history
  • Loading branch information
ashahi1 committed Feb 12, 2018
1 parent 3fe59ac commit 29b13af
Showing 1 changed file with 216 additions and 0 deletions.
216 changes: 216 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
pipeline {
agent none

stages {
stage('Checkout code') {
failFast true
parallel {
stage('Checkout on vdvs-slave-2') {
/* Let's make sure we have the repository cloned to our workspace. */
agent {
label "vdvs-slave-two"
}
steps {
checkout scm
}
}
stage('Checkout on vdvs-slave-3') {
/* Let's make sure we have the repository cloned to our workspace..*/
agent {
label "vdvs-slave-three"
}
steps {
checkout scm
}
}
}
}

stage('Build binaries') {
/* This builds VDVS binaries */
failFast true
parallel {
stage('Build binaries on vdvs-slave-2') {
agent {
label "vdvs-slave-two"
}
steps {
sh "echo Building the VDVS binaries"
sh "export PKG_VERSION=$BUILD_NUMBER"
sh "make build-all"
}
}

stage('Build binaries on vdvs-slave-3') {
agent {
label "vdvs-slave-three"
}
steps {
sh "echo Building the VDVS binaries"
sh "export PKG_VERSION=$BUILD_NUMBER"
sh "make build-all"
}
}
}
}

stage('Deployment') {
failFast true
parallel {
stage('Deploy VDVS On 6.5 setup') {
agent {
label "vdvs-slave-two"
}
steps {
sh "echo Deployment On 6.5 setup"
sh "echo ESX=$ESX; echo VM1=$VM1; echo VM2=$VM2; echo VM3=$VM3; echo PKG_VERSION"
sh "echo deploying binaries"
sh "make deploy-all"
sh "echo finished deploying the binaries"
}
}

stage('Deploy On 6.0 setup') {
agent {
label "vdvs-slave-three"
}
steps {
sh "echo Deployment On 6.0 setup"
sh "echo ESX=$ESX; echo VM1=$VM1; echo VM2=$VM2; echo VM3=$VM3; echo PKG_VERSION"
sh "echo deploying binaries"
sh "make deploy-all"
sh "echo finished deploying the binaries"
}
}
}
}

stage('Test VDVS') {
failFast true
parallel {
stage('Test On 6.5 setup') {
agent {
label "vdvs-slave-two"
}

steps {
sh "echo Test VDVS On 6.5 setup"
sh "echo ESX=$ESX; echo VM1=$VM1; echo VM2=$VM2; echo VM3=$VM3; echo PKG_VERSION"
sh "echo starting e2e tests"
sh "make test-e2e"
sh "make test-esx"
sh "make test-vm"
}
}
stage('Test On 6.0 setup') {
agent {
label "vdvs-slave-three"
}
steps {
sh "echo Test VDVS On 6.0 setup"
sh "echo ESX=$ESX; echo VM1=$VM1; echo VM2=$VM2; echo VM3=$VM3; echo PKG_VERSION"
sh "echo starting e2e tests"
sh "make test-e2e"
sh "make test-esx"
sh "make test-vm"
}
}
}
}

stage('Test vFile') {
failFast true
parallel {
stage('Test vFile On 6.5 setup') {
agent {
label "vdvs-slave-two"
}
steps {
script{
def stopContainers = "docker stop \$(docker ps -a -q) 2> /dev/null || true"
def removeContainers = "docker rm \$(docker ps -a -q) 2> /dev/null || true"
def removeVolumes = "docker volume rm \$(docker volume ls -q -f dangling=true) 2> /dev/null || true"
try{
sh "echo Build, deploy, and test vFile on 6.5 setup"
sh "echo Build vFile binaries"
sh "echo ESX = $ESX; echo VM1=$VM1; echo VM2=$VM2; echo VM3=$VM3;"
sh "make build-vfile-all"
sh "echo Deploy the vFile binaries"
sh "make deploy-vfile-plugin"
sh "echo Start the vFile tests"
sh "make test-e2e-vfile"
sh "echo vFile tests finished"
} finally{
sh "ssh ${env.GOVC_USERNAME}@$VM1 ${stopContainer}; ${removeContainer}; ${removeVolume}"
sh "ssh ${env.GOVC_USERNAME}@$VM2 ${stopContainer}; ${removeContainer}; ${removeVolume}"
sh "ssh ${env.GOVC_USERNAME}@$VM3 ${stopContainer}; ${removeContainer}; ${removeVolume}"
sh "make clean-vfile"
sh "make clean-all"
}
}
}
}

stage('Test vFile On 6.0 setup') {
agent {
label "vdvs-slave-three"
}

steps {
script{
def stopContainers = "docker stop \$(docker ps -a -q) 2> /dev/null || true"
def removeContainers = "docker rm \$(docker ps -a -q) 2> /dev/null || true"
def removeVolumes = "docker volume rm \$(docker volume ls -q -f dangling=true) 2> /dev/null || true"
try{
echo "Build, deploy, and test vFile on 6.0 setup"
sh "echo Build vFile binaries"
sh "echo ESX=$ESX; echo VM1=$VM1; echo VM2=$VM2; echo VM3=$VM3;"
sh "make build-vfile-all"
sh "echo Deploy the vFile binaries"
sh "make deploy-vfile-plugin"
sh "echo Run the vFile tests"
sh "make test-e2e-vfile"
sh "echo vFile tests finished"
}finally{
sh "ssh ${env.GOVC_USERNAME}@$VM1 ${stopContainer}; ${removeContainer}; ${removeVolume}"
sh "ssh ${env.GOVC_USERNAME}@$VM2 ${stopContainer}; ${removeContainer}; ${removeVolume}"
sh "ssh ${env.GOVC_USERNAME}@$VM3 ${stopContainer}; ${removeContainer}; ${removeVolume}"
sh "make clean-vfile"
sh "make clean-all"
}
}

}
}
}
}

stage('Windows plugin') {
/* This builds, deploys and tests the windows binaries */
agent {
label "vdvs-slave-two"
}

steps {
sh "echo Build, deploy, and test Windows plugin"
sh "echo Windows-VM=$WIN_VM1"
sh "echo Build Windows plugin binaries"
sh "make build-windows-plugin"
sh "echo Finished building binaries for windows"
sh "echo Deploy the Windows plugin binaries"
sh "make deploy-windows-plugin"
sh "echo Finished deploying binaries for windows"
sh "echo Run the Windows plugin tests"
sh "make test-e2e-windows"
sh "echo Windows plugin tests finished"
}
}
}

// The options directive is for configuration that applies to the whole job.
options {
// This ensures we only have 10 builds at a time, so
// we don't fill up our storage!
buildDiscarder(logRotator(numToKeepStr:'10'))
}
}

0 comments on commit 29b13af

Please sign in to comment.