From becf89b7d849426c13dee1761e7a2bf117d56799 Mon Sep 17 00:00:00 2001 From: Chris Bynum Date: Thu, 4 Aug 2016 00:32:15 -0400 Subject: [PATCH] Added build script from util to the pipeline --- Jenkinsfile | 6 ++---- build.sh | 6 ++++++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 build.sh diff --git a/Jenkinsfile b/Jenkinsfile index 1870b14..812cb16 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,9 +7,7 @@ node { try{ // Build Base Image - dir('bin') { - sh './build.sh &> debug' - } + sh './build.sh &> debug' // Build Base Image // sh './build_image.sh &> debug' // Run Base Container @@ -17,7 +15,7 @@ node { } 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" + sh "rm -f ./debug" handleError(message) } diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..909b400 --- /dev/null +++ b/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +source common.bash . + +echo "Building new Docker image($maintainer/$imagename)" +docker build --rm -t $maintainer/$imagename --build-arg maintainer=$maintainer --build-arg imagename=$imagename --build-arg version=$version .