Update SeaweedFS and add outdated checks
Build Alpine Packages / build-and-publish (v3.24, 3.24) (push) Has been cancelled
Build Alpine Packages / build-and-publish (v3.24, 3.24) (push) Has been cancelled
This commit is contained in:
+37
-29
@@ -5,8 +5,8 @@ repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
alpine_version="${ALPINE_VERSION:-3.24}"
|
||||
platform="${ALPINE_BUILD_PLATFORM:-linux/amd64}"
|
||||
arch="${ALPINE_ARCH:-x86_64}"
|
||||
packages="${TEST_SHELL_PACKAGES:-seaweedfs seaweedfs-doc bash-completion seaweedfs-master-openrc seaweedfs-filer-openrc seaweedfs-worker-openrc greptimedb lavinmq lavinmq-doc lavinmq-openrc gitea gitea-doc gitea-openrc}"
|
||||
shell="${TEST_SHELL:-/bin/bash}"
|
||||
packages="${TEST_SHELL_PACKAGES:-}"
|
||||
shell="${TEST_SHELL:-/bin/sh}"
|
||||
timeout_seconds="${TEST_SHELL_TIMEOUT:-120}"
|
||||
|
||||
case "${arch}" in
|
||||
@@ -24,9 +24,23 @@ if [[ ! -d "${repo_root}/packages/local/${arch}" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker_args=(--rm --platform "${platform}")
|
||||
shopt -s nullglob
|
||||
repo_keys=("${repo_root}/packages/local/${arch}"/*.rsa.pub)
|
||||
repo_indexes=("${repo_root}/packages/local/${arch}"/APKINDEX.tar.gz)
|
||||
shopt -u nullglob
|
||||
|
||||
if [[ "${#repo_keys[@]}" -eq 0 ]]; then
|
||||
printf 'missing repository key: packages/local/%s/*.rsa.pub\n' "${arch}" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ "${#repo_indexes[@]}" -eq 0 ]]; then
|
||||
printf 'missing repository index: packages/local/%s/APKINDEX.tar.gz\n' "${arch}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker_args=(--rm -i --platform "${platform}")
|
||||
if [[ -t 0 && -t 1 ]]; then
|
||||
docker_args+=(-it)
|
||||
docker_args+=(-t)
|
||||
fi
|
||||
|
||||
docker run "${docker_args[@]}" \
|
||||
@@ -46,31 +60,25 @@ docker run "${docker_args[@]}" \
|
||||
printf "Refreshing apk indexes...\n"
|
||||
timeout "${TEST_SHELL_TIMEOUT}" apk update
|
||||
|
||||
printf "Installing test packages: %s\n" "${PACKAGE_LIST}"
|
||||
timeout "${TEST_SHELL_TIMEOUT}" apk add ${PACKAGE_LIST}
|
||||
if [ -n "${PACKAGE_LIST}" ]; then
|
||||
printf "Installing requested test packages: %s\n" "${PACKAGE_LIST}"
|
||||
timeout "${TEST_SHELL_TIMEOUT}" apk add ${PACKAGE_LIST}
|
||||
fi
|
||||
|
||||
printf "\nInstalled default test packages:\n"
|
||||
apk info -e seaweedfs seaweedfs-doc seaweedfs-bash-completion \
|
||||
seaweedfs-master-openrc seaweedfs-filer-openrc seaweedfs-worker-openrc \
|
||||
greptimedb lavinmq lavinmq-doc lavinmq-openrc \
|
||||
gitea gitea-doc gitea-openrc \
|
||||
| sort
|
||||
if command -v weed >/dev/null 2>&1; then
|
||||
printf "\nSeaweedFS version:\n"
|
||||
weed version
|
||||
fi
|
||||
if command -v greptime >/dev/null 2>&1; then
|
||||
printf "\nGreptimeDB version:\n"
|
||||
greptime --version
|
||||
fi
|
||||
if command -v lavinmq >/dev/null 2>&1; then
|
||||
printf "\nLavinMQ version:\n"
|
||||
lavinmq -v
|
||||
fi
|
||||
if command -v gitea >/dev/null 2>&1; then
|
||||
printf "\nGitea version:\n"
|
||||
gitea --version
|
||||
fi
|
||||
printf "\nEntering %s. Repository mounted read-only at /work.\n\n" "${TEST_SHELL}"
|
||||
cat <<EOF
|
||||
|
||||
Local APK repository is ready.
|
||||
Repository: /repo
|
||||
Workspace: /work
|
||||
|
||||
Examples:
|
||||
apk add seaweedfs seaweedfs-master-openrc
|
||||
apk add greptimedb greptimedb-docs greptimedb-standalone-openrc
|
||||
apk add lavinmq lavinmq-openrc
|
||||
apk add gitea gitea-openrc
|
||||
|
||||
Entering ${TEST_SHELL}.
|
||||
|
||||
EOF
|
||||
exec "${TEST_SHELL}"
|
||||
'
|
||||
|
||||
Reference in New Issue
Block a user