Optimize Alpine packaging workflow
Build Alpine Packages / build-and-publish (v3.24, 3.24) (push) Successful in 2h16m43s
Build Alpine Packages / build-and-publish (v3.24, 3.24) (push) Successful in 2h16m43s
This commit is contained in:
@@ -2,45 +2,10 @@
|
||||
set -euo pipefail
|
||||
|
||||
repo_root="${REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../../.." && pwd)}"
|
||||
package_name="${PACKAGE_NAME:-gitea}"
|
||||
package_version="${PACKAGE_VERSION:-1.26.4-r0}"
|
||||
alpine_version="${ALPINE_VERSION:-3.24}"
|
||||
arch="${ALPINE_ARCH:-x86_64}"
|
||||
repository_url="${ALPINE_REPOSITORY_URL:-}"
|
||||
repository_key_url="${ALPINE_REPOSITORY_KEY_URL:-}"
|
||||
# shellcheck source=scripts/apk/test-install-lib.sh
|
||||
. "${repo_root}/scripts/apk/test-install-lib.sh"
|
||||
|
||||
case "${arch}" in
|
||||
x86_64)
|
||||
platform="${ALPINE_TEST_PLATFORM:-linux/amd64}"
|
||||
;;
|
||||
aarch64)
|
||||
platform="${ALPINE_TEST_PLATFORM:-linux/arm64}"
|
||||
;;
|
||||
*)
|
||||
printf 'unsupported Alpine architecture: %s\n' "${arch}" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ -z "${repository_url}" && "${SKIP_BUILD:-0}" != "1" ]]; then
|
||||
ALPINE_PACKAGE="${package_name}" "${repo_root}/scripts/apk/build.sh" build "${arch}"
|
||||
fi
|
||||
|
||||
if [[ -z "${repository_url}" && ! -d "${repo_root}/packages/local/${arch}" ]]; then
|
||||
printf 'missing local repository: packages/local/%s\n' "${arch}" >&2
|
||||
printf 'run: ALPINE_PACKAGE=%s mise run apk:build\n' "${package_name}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker run --rm --platform "${platform}" \
|
||||
-e "ALPINE_ARCH=${arch}" \
|
||||
-e "PACKAGE_NAME=${package_name}" \
|
||||
-e "PACKAGE_VERSION=${package_version}" \
|
||||
-e "ALPINE_REPOSITORY_URL=${repository_url}" \
|
||||
-e "ALPINE_REPOSITORY_KEY_URL=${repository_key_url}" \
|
||||
-v "${repo_root}/packages/local:/repo:ro" \
|
||||
"alpine:${alpine_version}" \
|
||||
sh -lc '
|
||||
apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-gitea}" "${PACKAGE_VERSION:-1.26.4-r0}" <<'SCRIPT'
|
||||
set -e
|
||||
|
||||
if [ -n "${ALPINE_REPOSITORY_URL}" ]; then
|
||||
@@ -85,4 +50,4 @@ docker run --rm --platform "${platform}" \
|
||||
|
||||
rc-update add gitea default
|
||||
test -L /etc/runlevels/default/gitea
|
||||
'
|
||||
SCRIPT
|
||||
|
||||
@@ -2,43 +2,10 @@
|
||||
set -euo pipefail
|
||||
|
||||
repo_root="${REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../../.." && pwd)}"
|
||||
package_name="${PACKAGE_NAME:-greptimedb}"
|
||||
alpine_version="${ALPINE_VERSION:-3.24}"
|
||||
arch="${ALPINE_ARCH:-x86_64}"
|
||||
repository_url="${ALPINE_REPOSITORY_URL:-}"
|
||||
repository_key_url="${ALPINE_REPOSITORY_KEY_URL:-}"
|
||||
# shellcheck source=scripts/apk/test-install-lib.sh
|
||||
. "${repo_root}/scripts/apk/test-install-lib.sh"
|
||||
|
||||
case "${arch}" in
|
||||
x86_64)
|
||||
platform="${ALPINE_TEST_PLATFORM:-linux/amd64}"
|
||||
;;
|
||||
aarch64)
|
||||
platform="${ALPINE_TEST_PLATFORM:-linux/arm64}"
|
||||
;;
|
||||
*)
|
||||
printf 'unsupported Alpine architecture: %s\n' "${arch}" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ -z "${repository_url}" && "${SKIP_BUILD:-0}" != "1" ]]; then
|
||||
ALPINE_PACKAGE="${package_name}" "${repo_root}/scripts/apk/build.sh" build "${arch}"
|
||||
fi
|
||||
|
||||
if [[ -z "${repository_url}" && ! -d "${repo_root}/packages/local/${arch}" ]]; then
|
||||
printf 'missing local repository: packages/local/%s\n' "${arch}" >&2
|
||||
printf 'run: ALPINE_PACKAGE=%s mise run apk:build\n' "${package_name}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker run --rm --platform "${platform}" \
|
||||
-e "ALPINE_ARCH=${arch}" \
|
||||
-e "PACKAGE_NAME=${package_name}" \
|
||||
-e "ALPINE_REPOSITORY_URL=${repository_url}" \
|
||||
-e "ALPINE_REPOSITORY_KEY_URL=${repository_key_url}" \
|
||||
-v "${repo_root}/packages/local:/repo:ro" \
|
||||
"alpine:${alpine_version}" \
|
||||
sh -lc '
|
||||
apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-greptimedb}" "${PACKAGE_VERSION:-}" <<'SCRIPT'
|
||||
set -e
|
||||
|
||||
if [ -n "${ALPINE_REPOSITORY_URL}" ]; then
|
||||
@@ -68,4 +35,4 @@ docker run --rm --platform "${platform}" \
|
||||
test -f "/usr/share/doc/${PACKAGE_NAME}/config/config.md"
|
||||
test -f "/usr/share/doc/${PACKAGE_NAME}/config/standalone.example.toml"
|
||||
find /etc/init.d -maxdepth 1 -name "greptimedb.*" -print | sort
|
||||
'
|
||||
SCRIPT
|
||||
|
||||
@@ -2,43 +2,10 @@
|
||||
set -euo pipefail
|
||||
|
||||
repo_root="${REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../../.." && pwd)}"
|
||||
package_name="${PACKAGE_NAME:-lavinmq}"
|
||||
alpine_version="${ALPINE_VERSION:-3.24}"
|
||||
arch="${ALPINE_ARCH:-x86_64}"
|
||||
repository_url="${ALPINE_REPOSITORY_URL:-}"
|
||||
repository_key_url="${ALPINE_REPOSITORY_KEY_URL:-}"
|
||||
# shellcheck source=scripts/apk/test-install-lib.sh
|
||||
. "${repo_root}/scripts/apk/test-install-lib.sh"
|
||||
|
||||
case "${arch}" in
|
||||
x86_64)
|
||||
platform="${ALPINE_TEST_PLATFORM:-linux/amd64}"
|
||||
;;
|
||||
aarch64)
|
||||
platform="${ALPINE_TEST_PLATFORM:-linux/arm64}"
|
||||
;;
|
||||
*)
|
||||
printf 'unsupported Alpine architecture: %s\n' "${arch}" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ -z "${repository_url}" && "${SKIP_BUILD:-0}" != "1" ]]; then
|
||||
ALPINE_PACKAGE="${package_name}" "${repo_root}/scripts/apk/build.sh" build "${arch}"
|
||||
fi
|
||||
|
||||
if [[ -z "${repository_url}" && ! -d "${repo_root}/packages/local/${arch}" ]]; then
|
||||
printf 'missing local repository: packages/local/%s\n' "${arch}" >&2
|
||||
printf 'run: ALPINE_PACKAGE=%s mise run apk:build\n' "${package_name}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker run --rm --platform "${platform}" \
|
||||
-e "ALPINE_ARCH=${arch}" \
|
||||
-e "PACKAGE_NAME=${package_name}" \
|
||||
-e "ALPINE_REPOSITORY_URL=${repository_url}" \
|
||||
-e "ALPINE_REPOSITORY_KEY_URL=${repository_key_url}" \
|
||||
-v "${repo_root}/packages/local:/repo:ro" \
|
||||
"alpine:${alpine_version}" \
|
||||
sh -lc '
|
||||
apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-lavinmq}" "${PACKAGE_VERSION:-}" <<'SCRIPT'
|
||||
set -e
|
||||
|
||||
if [ -n "${ALPINE_REPOSITORY_URL}" ]; then
|
||||
@@ -72,4 +39,4 @@ docker run --rm --platform "${platform}" \
|
||||
|
||||
rc-update add lavinmq default
|
||||
test -L /etc/runlevels/default/lavinmq
|
||||
'
|
||||
SCRIPT
|
||||
|
||||
@@ -2,38 +2,10 @@
|
||||
set -euo pipefail
|
||||
|
||||
repo_root="${REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../../.." && pwd)}"
|
||||
package_name="${PACKAGE_NAME:-seaweedfs}"
|
||||
alpine_version="${ALPINE_VERSION:-3.24}"
|
||||
arch="${ALPINE_ARCH:-x86_64}"
|
||||
# shellcheck source=scripts/apk/test-install-lib.sh
|
||||
. "${repo_root}/scripts/apk/test-install-lib.sh"
|
||||
|
||||
case "${arch}" in
|
||||
x86_64)
|
||||
platform="${ALPINE_TEST_PLATFORM:-linux/amd64}"
|
||||
;;
|
||||
aarch64)
|
||||
platform="${ALPINE_TEST_PLATFORM:-linux/arm64}"
|
||||
;;
|
||||
*)
|
||||
printf 'unsupported Alpine architecture: %s\n' "${arch}" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${SKIP_BUILD:-0}" != "1" ]]; then
|
||||
ALPINE_PACKAGE="${package_name}" "${repo_root}/scripts/apk/build.sh" build "${arch}"
|
||||
fi
|
||||
|
||||
if [[ ! -d "${repo_root}/packages/local/${arch}" ]]; then
|
||||
printf 'missing local repository: packages/local/%s\n' "${arch}" >&2
|
||||
printf 'run: ALPINE_PACKAGE=%s mise run apk:build\n' "${package_name}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker run --rm --platform "${platform}" \
|
||||
-e "ALPINE_ARCH=${arch}" \
|
||||
-v "${repo_root}/packages/local:/repo:ro" \
|
||||
"alpine:${alpine_version}" \
|
||||
sh -lc '
|
||||
apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-seaweedfs}" "${PACKAGE_VERSION:-}" <<'SCRIPT'
|
||||
set -e
|
||||
|
||||
cp "/repo/${ALPINE_ARCH}"/*.rsa.pub /etc/apk/keys/
|
||||
@@ -70,4 +42,4 @@ docker run --rm --platform "${platform}" \
|
||||
test -d /usr/share/doc/seaweedfs/examples
|
||||
test -f /usr/share/doc/seaweedfs/examples/master.toml
|
||||
test -f /usr/share/bash-completion/completions/weed
|
||||
'
|
||||
SCRIPT
|
||||
|
||||
Reference in New Issue
Block a user