-
Notifications
You must be signed in to change notification settings - Fork 1
/
create-latest
executable file
·39 lines (30 loc) · 1.01 KB
/
create-latest
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
#!/bin/bash
VERSIONED_IMAGES=$(find core -maxdepth 1 -type d -exec basename {} \; | sort)
VERSIONED_IMAGES_REV=$(echo "$IMAGES" | tac)
VERSIONS=$(wget https://alpinelinux.org/releases.json -q -O - | jq -r '.release_branches | map(.rel_branch | sub("v"; ""))[0:5][]')
echo Building images: $VERSIONED_IMAGES
echo Building versions: $VERSIONS
IFS=$'\n'
additional_tag=""
for version in $VERSIONS; do
for image in $VERSIONED_IMAGES; do
./create "core/${image}" "${version}" "${additional_tag}"
done
# Untag all images
for image in $VERSIONED_IMAGES_REV; do
docker image rm --force "voormedia/${image}:${version}"
done
if [ "$version" = "edge" ]; then
additional_tag="latest"
elif [ "$LATEST" = true ]; then
additional_tag=""
fi
done
# Build unversioned images
./create util/gcloud latest
./create util/kd latest
# Based on gcloud, must be built after
./create util/backup-base latest
./create util/backup-cloud-storage latest
./create util/backup-github latest
./create util/backup-postgresql latest