Files
alpine-packages/scripts/apk/ci-smoke.sh
T
fspjo 29c79708f1
Build Alpine Packages / preflight (pull_request) Successful in 7s
Build Alpine Packages / build (gitea) (pull_request) Successful in 3s
Build Alpine Packages / build (greptimedb) (pull_request) Successful in 3s
Build Alpine Packages / build (lavinmq) (pull_request) Successful in 4s
Build Alpine Packages / build (nifi) (pull_request) Successful in 3s
Build Alpine Packages / build (rclone-openrc) (pull_request) Successful in 9s
Build Alpine Packages / build (seaweedfs) (pull_request) Successful in 3s
Build Alpine Packages / verify-and-publish (pull_request) Successful in 27s
Build Alpine Packages / preflight (push) Failing after 5s
Build Alpine Packages / build (gitea) (push) Skipped
Build Alpine Packages / build (greptimedb) (push) Skipped
Build Alpine Packages / build (lavinmq) (push) Skipped
Build Alpine Packages / build (nifi) (push) Skipped
Build Alpine Packages / build (rclone-openrc) (push) Skipped
Build Alpine Packages / build (seaweedfs) (push) Skipped
Build Alpine Packages / verify-and-publish (push) Skipped
add rclone-openrc (#21)
Reviewed-on: #21
2026-10-07 14:24:24 +02:00

81 lines
2.4 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
# shellcheck source=scripts/apk/package-lib.sh
. "${repo_root}/scripts/apk/package-lib.sh"
repo_name="${ALPINE_REPO_NAME:-local}"
arch="${ALPINE_ARCH:-$(apk --print-arch)}"
packages="${SMOKE_PACKAGES:-seaweedfs seaweedfs-master-openrc seaweedfs-filer-openrc seaweedfs-worker-openrc greptimedb lavinmq lavinmq-openrc gitea gitea-openrc rclone-openrc}"
repo_dir="${repo_root}/packages/${repo_name}/${arch}"
registry_url="${ALPINE_REGISTRY_URL:-}"
registry_key="${ALPINE_REGISTRY_KEY:-}"
read -r -a package_list <<< "${packages}"
declare -A source_packages=()
while IFS= read -r package_dir; do
while IFS= read -r spec; do
source_packages["${spec%%=*}"]=1
done < <(apk_package_versioned_names "${package_dir}" "${arch}")
done < <(apk_all_package_dirs "${repo_root}")
for package in "${package_list[@]}"; do
if [[ -z "${source_packages[${package}]:-}" ]]; then
printf 'smoke package is not defined by a source APKBUILD: %s\n' "${package}" >&2
exit 2
fi
done
if [[ -d "${repo_dir}" ]]; then
cp "${repo_dir}"/*.rsa.pub /etc/apk/keys/
echo "${repo_root}/packages/${repo_name}" >> /etc/apk/repositories
fi
if [[ -n "${registry_url}" ]]; then
if [[ ! -f "${registry_key}" ]]; then
printf 'missing Alpine registry signing key: %s\n' "${registry_key:-<unset>}" >&2
exit 1
fi
cp "${registry_key}" /etc/apk/keys/
echo "${registry_url}" >> /etc/apk/repositories
fi
if [[ ! -d "${repo_dir}" && -z "${registry_url}" ]]; then
printf 'missing local repository and no registry fallback: packages/%s/%s\n' "${repo_name}" "${arch}" >&2
exit 1
fi
apk update
apk add "${package_list[@]}"
if command -v weed >/dev/null 2>&1; then
weed version
ls -1 /etc/seaweedfs
fi
if command -v greptime >/dev/null 2>&1; then
greptime --version
fi
if command -v lavinmq >/dev/null 2>&1; then
lavinmq -v
lavinmqctl --version
lavinmqperf --version
fi
if command -v gitea >/dev/null 2>&1; then
gitea --version
test -f /etc/gitea/app.ini
test -d /var/lib/gitea
fi
if command -v rclone >/dev/null 2>&1; then
rclone version
test -f /etc/conf.d/rclone
test -f /etc/init.d/rclone
fi
if ls /etc/init.d/seaweedfs.* >/dev/null 2>&1; then
find /etc/init.d -maxdepth 1 -name 'seaweedfs.*' -print | sort
fi
if [[ -f /etc/init.d/lavinmq ]]; then
printf '%s\n' /etc/init.d/lavinmq
fi
if [[ -f /etc/init.d/gitea ]]; then
printf '%s\n' /etc/init.d/gitea
fi