2021-01-06 12:36:52 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2021-01-14 07:04:43 +01:00
|
|
|
build_www_dir() {
|
2021-02-16 10:21:48 +01:00
|
|
|
local webpacked_www=$PWD/builder/www
|
|
|
|
local src_www=kasmweb
|
|
|
|
|
|
|
|
if [ "$src_www" -nt "$webpacked_www" ]; then
|
|
|
|
docker build -t kasmweb/www -f builder/dockerfile.www.build .
|
|
|
|
docker run --rm -v $PWD/builder/www:/build kasmweb/www:latest
|
|
|
|
fi
|
2021-01-14 07:04:43 +01:00
|
|
|
}
|
|
|
|
|
2021-01-20 10:42:52 +01:00
|
|
|
shared_with_docker_dir=${GITLAB_SHARED_DIND_DIR:-/tmp}
|
|
|
|
|
2021-01-06 12:36:52 +01:00
|
|
|
cd "$(dirname "$0")/.."
|
2021-01-19 10:44:32 +01:00
|
|
|
. builder/os_ver_cli.sh
|
2021-01-06 12:36:52 +01:00
|
|
|
|
2021-01-14 07:04:43 +01:00
|
|
|
build_www_dir
|
|
|
|
|
2021-01-28 10:10:46 +01:00
|
|
|
docker build -t kasmvncbuilder:$os_codename \
|
2021-01-28 11:46:21 +01:00
|
|
|
-f builder/dockerfile.${os}_${os_codename}.build .
|
2021-01-06 12:36:52 +01:00
|
|
|
mkdir -p builder/build
|
2021-02-14 06:59:53 +01:00
|
|
|
docker run -v $shared_with_docker_dir:/build --rm kasmvncbuilder:$os_codename
|
2021-01-10 17:24:09 +01:00
|
|
|
|
|
|
|
L_GID=$(id -g)
|
|
|
|
L_UID=$(id -u)
|
2021-01-28 10:10:46 +01:00
|
|
|
tarball_name="kasmvnc.${os}_${os_codename}.tar.gz"
|
2021-02-14 06:59:53 +01:00
|
|
|
chown $L_UID:$L_GID $shared_with_docker_dir/$tarball_name
|
|
|
|
mv $shared_with_docker_dir/$tarball_name $PWD/builder/build/
|