hermes: use contributor Gitea identity
Some checks failed
Tests / Declarative: Post Actions failed: 2, passed: 266

This commit is contained in:
jenkins 2026-08-13 21:25:44 -03:00
parent 7c9a02f298
commit 8151c7a0d7
2 changed files with 14 additions and 8 deletions

View File

@ -25,7 +25,7 @@ spec:
ai.bstein.dev/execution: Hermes Kanban with durable direct Codex and Claude Code CLI workers ai.bstein.dev/execution: Hermes Kanban with durable direct Codex and Claude Code CLI workers
ai.bstein.dev/model-policy: Jetson-assisted AUTO routing, low through xhigh, cross-provider fallback ai.bstein.dev/model-policy: Jetson-assisted AUTO routing, low through xhigh, cross-provider fallback
ai.bstein.dev/placement: rpi5 preferred; Jetson deferred until state storage is available ai.bstein.dev/placement: rpi5 preferred; Jetson deferred until state storage is available
ai.bstein.dev/config-rev: "20260813-kanban-corruption-isolation" ai.bstein.dev/config-rev: "20260813-gitea-service-identity"
vault.hashicorp.com/agent-inject: "true" vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/role: hermes-agent vault.hashicorp.com/role: hermes-agent
vault.hashicorp.com/agent-inject-secret-anthropic-token: kv/data/atlas/hermes/agent-tokens vault.hashicorp.com/agent-inject-secret-anthropic-token: kv/data/atlas/hermes/agent-tokens
@ -33,12 +33,15 @@ spec:
{{- with secret "kv/data/atlas/hermes/agent-tokens" -}} {{- with secret "kv/data/atlas/hermes/agent-tokens" -}}
{{ .Data.data.anthropic_oauth_token }} {{ .Data.data.anthropic_oauth_token }}
{{- end }} {{- end }}
vault.hashicorp.com/agent-inject-secret-gitea-token: kv/data/atlas/hermes/agent-tokens vault.hashicorp.com/agent-inject-secret-gitea-token: kv/data/atlas/hermes/developer-gitea
vault.hashicorp.com/agent-inject-template-gitea-token: | vault.hashicorp.com/agent-inject-template-gitea-token: |
{{- with secret "kv/data/atlas/hermes/agent-tokens" -}} {{- with secret "kv/data/atlas/hermes/developer-gitea" -}}
{{- with index .Data.data "gitea_token" -}} {{ .Data.data.token }}
{{ . }} {{- end }}
{{- end -}} vault.hashicorp.com/agent-inject-secret-gitea-username: kv/data/atlas/hermes/developer-gitea
vault.hashicorp.com/agent-inject-template-gitea-username: |
{{- with secret "kv/data/atlas/hermes/developer-gitea" -}}
{{ .Data.data.username }}
{{- end }} {{- end }}
vault.hashicorp.com/agent-inject-secret-chat-relay-key: kv/data/atlas/hermes/chat-telegram vault.hashicorp.com/agent-inject-secret-chat-relay-key: kv/data/atlas/hermes/chat-telegram
vault.hashicorp.com/agent-inject-template-chat-relay-key: | vault.hashicorp.com/agent-inject-template-chat-relay-key: |
@ -134,11 +137,14 @@ spec:
token="$(tr -d '\r\n' < /vault/secrets/gitea-token)" token="$(tr -d '\r\n' < /vault/secrets/gitea-token)"
case "${token}" in ""|"<no value>"|"<nil>") ;; *) upsert_env GITEA_TOKEN "${token}" ;; esac case "${token}" in ""|"<no value>"|"<nil>") ;; *) upsert_env GITEA_TOKEN "${token}" ;; esac
fi fi
if [ -s /vault/secrets/gitea-username ]; then
username="$(tr -d '\r\n' < /vault/secrets/gitea-username)"
case "${username}" in ""|"<no value>"|"<nil>") ;; *) upsert_env GITEA_USERNAME "${username}" ;; esac
fi
if [ -s /vault/secrets/chat-relay-key ]; then if [ -s /vault/secrets/chat-relay-key ]; then
token="$(tr -d '\r\n' < /vault/secrets/chat-relay-key)" token="$(tr -d '\r\n' < /vault/secrets/chat-relay-key)"
[ -z "${token}" ] || upsert_env HERMES_IMAGE_BROKER_KEY "${token}" [ -z "${token}" ] || upsert_env HERMES_IMAGE_BROKER_KEY "${token}"
fi fi
upsert_env GITEA_USERNAME bstein
upsert_env GIT_ASKPASS /opt/coordinator/gitea_askpass.sh upsert_env GIT_ASKPASS /opt/coordinator/gitea_askpass.sh
upsert_env GIT_TERMINAL_PROMPT 0 upsert_env GIT_TERMINAL_PROMPT 0
chmod 0600 "${env_file}" chmod 0600 "${env_file}"

View File

@ -2,7 +2,7 @@
set -eu set -eu
case "${1:-}" in case "${1:-}" in
*Username*) printf '%s\n' "${GITEA_USERNAME:-bstein}" ;; *Username*) printf '%s\n' "${GITEA_USERNAME:-hermes-automation}" ;;
*Password*) printf '%s\n' "${GITEA_TOKEN:-}" ;; *Password*) printf '%s\n' "${GITEA_TOKEN:-}" ;;
*) exit 1 ;; *) exit 1 ;;
esac esac