From 2455edd631a4f1fbccbf6054783c7952329c883c Mon Sep 17 00:00:00 2001 From: "R. Tyler Croy" Date: Wed, 3 Aug 2016 12:29:39 -0700 Subject: [PATCH] Properly build the base image in the pipeline --- Jenkinsfile | 5 ++++- build-base.sh | 7 +++++++ build-rubies.sh | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 build-base.sh diff --git a/Jenkinsfile b/Jenkinsfile index e8ef6c4..fba04b3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,10 @@ node('docker') { checkout scm - stage 'Build Containers' + stage 'Prepare base RVM container' + sh './build-base.sh' + + stage 'Build Containers for Rubies' sh './build-rubies.sh' stage 'Publish Containers' diff --git a/build-base.sh b/build-base.sh new file mode 100755 index 0000000..770bd72 --- /dev/null +++ b/build-base.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -x + +source ./rubies + +docker build -t ${IMAGE_TAG} . diff --git a/build-rubies.sh b/build-rubies.sh index 07a9876..a882bbb 100755 --- a/build-rubies.sh +++ b/build-rubies.sh @@ -9,7 +9,7 @@ mkdir -p work for RUBY in "${RUBIES[@]}"; do DOCKERFILE="work/dockerfile-${RUBY}" cat > $DOCKERFILE <