Public Access
Provides a self-contained, containerized aptly (Debian repo manager) stack with independently releasable image and Helm chart versions. - images/: aptly-server (aptly built from source, cross-compiled) and aptly-deb-builder (nfpm + dpkg-buildpackage) container images - rootfs/: shared aptly-init/aptly-reconcile/aptly-push/aptly-pack scripts consumed identically by Compose and the Helm chart, driven by one declarative state.yaml contract - compose/: test (ephemeral, open) and production docker-compose stacks with an nginx read/auth sidecar - charts/aptly/: aptly-native Helm chart covering every security posture from fully open to authenticated read+write, Ingress and Gateway API support (usable in parallel for migration scenarios), metrics, and declarative repo/mirror/publish reconciliation via a Helm hook - .gitea/workflows/: CI (lint, template, kubeconform, E2E smoke test) plus separately tagged image (image/v*) and chart (chart/v*) releases, weekly rebuilds, and a preflight workflow validating the runner's Docker/Helm-OCI capabilities - pubkeys/: RSA chart-signing key for Helm --sign / Artifact Hub's signKey annotation (Helm can't verify Ed25519 keys) - docs/, README.md, charts/aptly/README.md: usage, security, and versioning documentation
50 lines
1.4 KiB
Makefile
50 lines
1.4 KiB
Makefile
SHELL := /usr/bin/env bash
|
|
.SHELLFLAGS := -euo pipefail -c
|
|
IMAGE_TAG ?= local
|
|
|
|
.PHONY: build build-server build-deb-builder lint hadolint shellcheck helm-lint helm-template test chart-package compose-test-up compose-test-down clean
|
|
|
|
build: build-server build-deb-builder
|
|
|
|
build-server:
|
|
docker build -f images/aptly-server/Dockerfile -t aptly-server:$(IMAGE_TAG) .
|
|
|
|
build-deb-builder:
|
|
docker build -f images/aptly-deb-builder/Dockerfile -t aptly-deb-builder:$(IMAGE_TAG) .
|
|
|
|
lint: hadolint shellcheck helm-lint helm-template
|
|
|
|
hadolint:
|
|
docker run --rm -i hadolint/hadolint < images/aptly-server/Dockerfile
|
|
docker run --rm -i hadolint/hadolint < images/aptly-deb-builder/Dockerfile
|
|
|
|
shellcheck:
|
|
docker run --rm -v "$$PWD:/work" -w /work koalaman/shellcheck:stable -x \
|
|
rootfs/usr/local/bin/aptly-* rootfs/usr/local/bin/lib/common.sh tests/smoke-test.sh
|
|
|
|
helm-lint:
|
|
helm lint charts/aptly
|
|
|
|
helm-template:
|
|
helm template test charts/aptly >/dev/null
|
|
for f in charts/aptly/ci/*.yaml; do \
|
|
echo "-- $$f --"; \
|
|
helm template test charts/aptly -f "$$f" >/dev/null; \
|
|
done
|
|
|
|
test:
|
|
./tests/smoke-test.sh
|
|
|
|
chart-package:
|
|
helm package charts/aptly --destination dist/
|
|
|
|
compose-test-up:
|
|
docker compose -f compose/docker-compose.test.yaml up -d --build
|
|
|
|
compose-test-down:
|
|
docker compose -f compose/docker-compose.test.yaml down -v
|
|
|
|
clean: compose-test-down
|
|
docker compose -f compose/docker-compose.yaml down -v 2>/dev/null || true
|
|
rm -rf dist/
|