Skip to content
Permalink
5590fbe91c
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
 
 
Cannot retrieve contributors at this time
40 lines (32 sloc) 1012 Bytes
node {
stage 'Checkout'
checkout scm
stage 'BUILD: Base'
try{
// Build Base Image
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('./debug');
def message = "BUILD ERROR: There was a problem building the Base Image. \n\n ${error_details}"
sh "rm -f ./debug"
handleError(message)
}
stage 'TEST: Base'
sh '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'
}