Skip to content
Permalink
4e07c7deaf
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Latest commit 4e07c7d Aug 4, 2016 History
0 contributors

Users who have contributed to this file

42 lines (34 sloc) 1.04 KB
node {
stage 'Checkout'
checkout scm
stage 'BUILD: Base'
try{
// Build Base Image
dir('bin') {
sh './build.sh &> debug'
}
// Build Base Image
// sh './build_image.sh &> debug'
// Run Base Container
// sh 'bin/run.sh'
} catch(error) {
def error_details = readFile('./bin/debug');
def message = "BUILD ERROR: There was a problem building the Base Image. \n\n ${error_details}"
sh "rm -f ./bin/debug"
handleError(message)
}
stage 'TEST: Base'
sh '/usr/local/bin/bats tests/base.bats'
stage 'SHIP: Base'
docker.withRegistry('https://registry.hub.docker.com/', 'dockerhub-bigfleet') {
def baseImg = docker.build('bigfleet/centos7base')
baseImg.push('latest')
}
}
def handleError(String message){
echo "${message}"
currentBuild.setResult("FAILED")
slackSend color: 'danger', message: "${message}"
step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'chris.bynum@levvel.io', sendToIndividuals: true])
sh 'exit 1'
}