mirror of
https://github.com/rancher/os-kernel.git
synced 2025-05-31 01:34:52 +00:00
30 lines
660 B
Bash
Executable File
30 lines
660 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
BASE=images
|
|
|
|
source $(dirname $0)/version
|
|
cd $(dirname $0)/..
|
|
|
|
mkdir -p dist
|
|
> dist/images
|
|
|
|
for i in $BASE/[1-9]*; do
|
|
name="os-$(echo ${i} | cut -f2 -d-)"
|
|
tag="${OS_REPO}/${name}:${KERNEL_VERSION}${SUFFIX}"
|
|
echo Building ${tag}
|
|
if [ -e ${i}/prebuild.sh ]; then
|
|
echo "running ${i}/prebuild.sh in $(pwd)"
|
|
${i}/prebuild.sh
|
|
fi
|
|
|
|
if dapper -d --build -f ${i}/Dockerfile -- -t rancher/${name} --build-arg KERNEL_VERSION ${i}; then
|
|
docker tag rancher/${name} ${tag}
|
|
echo ${tag} >> dist/images
|
|
elif [ "$?" != "42" ]; then
|
|
exit 1
|
|
else
|
|
echo "Skipping ${tag}"
|
|
fi
|
|
done
|