Skip to content

Commit

Permalink
Merge branch 'master' into comanage-production
Browse files Browse the repository at this point in the history
  • Loading branch information
Mason Packard committed Sep 14, 2016
2 parents 224ec99 + 097561b commit 2f33671
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def performBuild(String project){
try {
stage 'Cleanup & Setup'
sh "rm -rf output-${project}-*"
sh "rm -rf \"~/VirtualBox VMs/${project}-appliance-*\""
sh "bin/remove-${project}.sh"
sh 'rm -rf builds'
sh 'mkdir -p builds'

Expand Down Expand Up @@ -75,14 +75,19 @@ def performBuild(String project){
}

catch (err) {
handleError("BUILD ERROR: There was a problem with ${project} Appliance. ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL} |Open>) \n\n ${err}")
handleError("BUILD ERROR: There was a problem with ${project} Appliance. ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL} |Open>) \n\n ${err}", "${project}-appliance-centos7-xfs")
}
}

def handleError(String message){
def handleError(String message, String appliance_name){
echo "${message}"
currentBuild.setResult("FAILED")
slackSend color: 'danger', message: "${message}"
//step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'chris.bynum@levvel.io', sendToIndividuals: true])

sh "VBoxManage controlvm ${appliance_name} poweroff"

sh "VboxManage unregistervm ${appliance_name} --delete"

sh 'exit 1'
}
3 changes: 3 additions & 0 deletions bin/remove-comanage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

rm -rf $HOME/VirtualBox\ VMs/comanage-appliance-centos7-xfs/
3 changes: 3 additions & 0 deletions bin/remove-grouper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

rm -rf $HOME/VirtualBox\ VMs/grouper-appliance-centos7-xfs/
3 changes: 3 additions & 0 deletions bin/remove-shibboleth.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

rm -rf $HOME/VirtualBox\ VMs/shibboleth-appliance-centos7-xfs/

0 comments on commit 2f33671

Please sign in to comment.