Publish curated Unraid-AppOps-Gateway source from ba66029223865607deddc234e283c11127324eb8

This commit is contained in:
Public Source Publisher committed 2026-10-07 01:56:22 +00:00
1 parent 820244dbb3
commit 8dd4b40252
52 files changed
+11814 -288

No files matched your search

@@ -43,24 +43,68 @@ def helper_container_spec(
raise ValueError("controller_promoter_bootstrap_binding_invalid")
command = f"""set -Eeuo pipefail
phase=shell_setup
work=''
diagnostic_emitted=0
emit_failure() {{
local exit_code="$1"
if (( diagnostic_emitted == 0 )); then
printf 'APPOPS_CONTROLLER_PROMOTION_DIAGNOSTIC code=helper_failed phase=%s exitCode=%s\\n' "$phase" "$exit_code" >&2
diagnostic_emitted=1
fi
}}
on_error() {{
local exit_code=$?
trap - ERR
emit_failure "$exit_code"
exit "$exit_code"
}}
cleanup() {{
local exit_code=$?
local cleanup_exit_code=0
trap - EXIT
phase=cleanup
if [[ -n "$work" ]]; then
if rm -rf -- "$work"; then
:
else
cleanup_exit_code=$?
emit_failure "$cleanup_exit_code"
if (( exit_code == 0 )); then exit_code=$cleanup_exit_code; fi
fi
fi
exit "$exit_code"
}}
trap on_error ERR
umask 077
revision='{revision}'
version='{CONTROLLER_VERSION}'
image_id='{image_id}'
repo='/gitea-repositories/jens/unraid-appops-gateway.git'
[[ \"$(stat -c '%a:%u:%g' /tmp)\" == '1777:0:0' ]]
work=\"$(mktemp -d -p /tmp itworx-controller-artifact-promoter-{revision[:12]}.XXXXXX)\"
phase=tmp_root
[[ \"$(trap - ERR; stat -c '%a:%u:%g' /tmp)\" == '1777:0:0' ]]
phase=workspace_create
work=\"$(trap - ERR; mktemp -d -p /tmp itworx-controller-artifact-promoter-{revision[:12]}.XXXXXX)\"
phase=workspace_validate
[[ -d \"$work\" && ! -L \"$work\" && \"$(stat -c '%u:%a' \"$work\")\" == '0:700' ]]
cleanup() {{ rm -rf -- \"$work\"; }}
trap cleanup EXIT
phase=tool_git
command -v git >/dev/null
phase=tool_docker
command -v docker >/dev/null
phase=tool_compose
docker compose version >/dev/null
phase=tool_python
command -v python3 >/dev/null
phase=tool_tar
command -v tar >/dev/null
phase=tool_curl
command -v curl >/dev/null
phase=source_commit
git --git-dir=\"$repo\" cat-file -e \"$revision^{{commit}}\"
tree=\"$(git --git-dir=\"$repo\" rev-parse \"$revision^{{tree}}\")\"
phase=source_tree
tree=\"$(trap - ERR; git --git-dir=\"$repo\" rev-parse \"$revision^{{tree}}\")\"
phase=source_archive
git --git-dir=\"$repo\" archive --format=tar \"$revision\" \\
ops/gitea-deploy-broker \\
scripts/prepare_controller_artifact.py \\
@@ -69,10 +113,15 @@ git --git-dir=\"$repo\" archive --format=tar \"$revision\" \\
scripts/vendor \\
scripts/run_repopulse_adoption.py \
scripts/upgrade_deployment_controller.sh > \"$work/controller.tar\"
phase=archive_permissions
chmod 0600 \"$work/controller.tar\"
archive_sha=\"$(sha256sum \"$work/controller.tar\" | cut -d ' ' -f 1)\"
phase=archive_digest
archive_sha=\"$(trap - ERR; sha256sum \"$work/controller.tar\" | cut -d ' ' -f 1)\"
phase=upgrade_script
git --git-dir=\"$repo\" show \"$revision:scripts/upgrade_deployment_controller.sh\" > \"$work/upgrade.sh\"
phase=upgrade_permissions
chmod 0700 \"$work/upgrade.sh\"
phase=upgrade
bash \"$work/upgrade.sh\" \\
--archive \"$work/controller.tar\" \\
--archive-sha256 \"$archive_sha\" \\