Port the launcher to Go on the podman API bindings
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful

This commit is contained in:
2026-10-24 16:49:43 +11:00
parent 1e250f1113
commit af55d83de6
19 changed files with 1998 additions and 389 deletions
+20 -10
View File
@@ -1,16 +1,26 @@
#!/usr/bin/env bash
# Package the launcher and default allowlist into an RPM with nfpm. The
# packaged launcher defaults to the published images for this version.
# Package the (already built) agent-sandbox binary, its shell completions and
# the default allowlist into an RPM with nfpm.
# Usage: scripts/build-rpm.sh [version] (defaults to $CI_COMMIT_TAG)
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/.."
TAG="${1:-${CI_COMMIT_TAG:-v0.0.0-dev}}"
mkdir -p dist
sed "s/^VERSION=dev$/VERSION=$TAG/" agent-sandbox >dist/agent-sandbox
grep -q "^VERSION=$TAG$" dist/agent-sandbox
VERSION="${1:-${CI_COMMIT_TAG:-v0.0.0-dev}}"
[[ $VERSION == dev ]] && VERSION=v0.0.0-dev
DIST=dist
BINARY=agent-sandbox
export PACKAGE_VERSION="${TAG#v}"
envsubst <packaging/nfpm.yaml >dist/nfpm.yaml
nfpm pkg --config dist/nfpm.yaml --target dist --packager rpm
ls -1 dist/*.rpm
if [[ ! -f $DIST/$BINARY ]]; then
echo "ERROR: $DIST/$BINARY not found; run 'make bin' first" >&2
exit 1
fi
mkdir -p "$DIST/completions"
"./$DIST/$BINARY" completion bash >"$DIST/completions/$BINARY.bash"
"./$DIST/$BINARY" completion zsh >"$DIST/completions/_$BINARY"
"./$DIST/$BINARY" completion fish >"$DIST/completions/$BINARY.fish"
export PACKAGE_VERSION="${VERSION#v}"
envsubst <packaging/nfpm.yaml >"$DIST/nfpm.yaml"
nfpm pkg --config "$DIST/nfpm.yaml" --target "$DIST" --packager rpm
ls -1 "$DIST"/*.rpm