-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_zfs.sh
executable file
·51 lines (41 loc) · 1.19 KB
/
build_zfs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
help() {
echo "./convert.sh <coreos_channel> <coreos_version>"
echo "Environment variables needed:"
echo "Variable Example"
echo "DOCKER_REGISTRY myprivaterepo.com"
echo "COREOS_DEV_IMAGE coreos/dev-container"
echo "KBUILDER_IMAGE coreos/kmod-builder"
echo "ZFS_INJECTOR_IMAGE coreos/zfs-injector"
echo
echo "Depending on your version of docker you might need to set DOCKER_API_VERSION."
exit 1
}
COREOS_CHANNEL="$1"
COREOS_VERSION="$2"
SPL_VERSION="$3"
ZFS_VERSION="$4"
if [ -z "$COREOS_CHANNEL" ]; then
echo "No CoreOS channel defined. Please set \$COREOS_CHANNEL"
help
fi
if [ -z "$COREOS_VERSION" ]; then
echo "No CoreOS version defined. Please set \$COREOS_VERSION"
help
fi
if [ -z "$SPL_VERSION" ]; then
echo "No Solaris Porting Layer version defined. Please set \$SPL_VERSION"
help
fi
if [ -z "$ZFS_VERSION" ]; then
echo "No ZFS version defined. Please set \$ZFS_VERSION"
help
fi
if [ -z "$DOCKER_REGISTRY" ]; then
echo "No private registry set. Please set \$DOCKER_REGISTRY"
help
fi
cd kbuilder
./build.sh $COREOS_CHANNEL $COREOS_VERSION
cd ../zfs
./build.sh $COREOS_VERSION $SPL_VERSION $ZFS_VERSION