-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.conf
49 lines (40 loc) · 1.49 KB
/
build.conf
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
# shellcheck shell=bash disable=SC2034
SOURCE_REPO='moonbuggy2000/alpine-s6'
BUILD_MULTIARCH='true'
declare -A BUILD_ARGS=( \
[ALPINE_VERSION]='Alpine version' \
[SYSLOG_NG_VERSION]='Syslog-ng version' \
[APK_PROXY]='APK proxy' \
)
declare -A CHECKOUT_DISPLAY=( \
[SYSLOG_NG_VERSION]='Syslog-ng version' \
[SYSLOG_NG_LATEST]='Syslog-ng latest' \
[ALPINE_VERSION]='Alpine version' \
[ALPINE_LATEST]='Alpine latest' \
)
post_checkout_start () {
eval_param_ifn 'ALPINE_LATEST' "docker_api_latest ${SOURCE_REPO}"
case "${DOCKER_TAG}" in
latest) ALPINE_VERSION="${ALPINE_LATEST}" ;;
3.19*) ALPINE_VERSION='3.10' ;;&
3.22*) ALPINE_VERSION='3.11' ;;&
3.27*) ALPINE_VERSION='3.12' ;;&
3.30*) ALPINE_VERSION='3.15' ;;&
3.38*) ALPINE_VERSION='3.17' ;;&
4.1*) ALPINE_VERSION='3.18' ;;&
4.5*) ALPINE_VERSION='3.19' ;;&
4.7*) ALPINE_VERSION='3.20' ;;&
3.*|4.*) SYSLOG_NG_VERSION="${DOCKER_TAG%%[^0-9.]*}" ;;
esac
add_param "${ALPINE_VERSION:-${ALPINE_LATEST}}" 'ALPINE_VERSION'
eval_param 'SYSLOG_NG_LATEST' "alpine_package_version syslog-ng ${ALPINE_LATEST}"
eval_param 'SYSLOG_NG_VERSION' "alpine_package_version syslog-ng ${ALPINE_VERSION}"
eval_param 'SYSLOG_NG_MINOR' "parse_version_minor ${SYSLOG_NG_VERSION}"
TARGET_TAG="${SYSLOG_NG_VERSION}"
SOURCE_TAG="${ALPINE_VERSION}"
}
## return extra tags to add during post_push
get_manifest_tags () {
[ "${SYSLOG_NG_VERSION}" = "${SYSLOG_NG_LATEST}" ] && printf 'latest '
echo "${SYSLOG_NG_MINOR}"
}