Newer
Older
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
#! /bin/bash
WORK_DIR="$(mktemp -d)"
ORGNAME="kontr2"
BASE_REPO="git@gitlab.fi.muni.cz:grp-kontr2"
function build_one()
{
name=$1
repo=$2
path="$WORK_DIR/$name"
echo "[BUILD] \"$name\": ${repo}"
echo "[CLONE] \"$repo\" to \"$path\" "
git clone --depth 1 "$repo" "$path"
tag="$ORGNAME/$name"
echo "[DOCKER] Building $tag"
docker build "$path" --tag "$tag"
echo "[DOCKER] Pushing $tag"
docker push "$tag"
}
function build_portal_all()
{
echo "[BUILD] All portal related images"
build_one "portal" "$BASE_REPO/portal.git"
build_one "frontend" "$BASE_REPO/portal-frontend.git"
}
function build_all()
{
echo "[BUILD] All docker images"
build_portal_all
}
build_all