Skip to content
Permalink
f0340cc7e5
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'
}
You can’t perform that action at this time.