1
0
mirror of https://github.com/rancher/os.git synced 2025-06-21 12:37:04 +00:00
os/scripts/build-images
Sven Dowideit 67ab66f95d Add info telling me how to release
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2016-11-24 01:51:24 +00:00

31 lines
628 B
Bash
Executable File

#!/bin/bash
set -e
export ARCH=${ARCH:-"amd64"}
BASE=images
source $(dirname $0)/version
cd $(dirname $0)/..
mkdir -p dist
rm -f dist/images
touch dist/images
for i in $BASE/[0-9]*; do
name="os-$(echo ${i} | cut -f2 -d-)"
tag="${OS_REPO}/${name}:${VERSION}${SUFFIX}"
echo Building ${tag}
if [ -x ${i}/prebuild.sh ]; then
${i}/prebuild.sh
fi
if dapper -d --build -f ${i}/Dockerfile -- -t rancher/${name} ${i}; then
docker tag rancher/${name} ${tag}
echo "${tag}" >> dist/images
elif [ "$?" != "42" ]; then
exit 1
else
echo "WARN: Skipping ${tag}"
fi
done