Files
computer-playbook/roles/web-app-jenkins/vars/main.yml
kevinveenbirkenbachandClaude Opus 5 30d8671c39 refactor(mcp): let the sidecar entry be the switch, not the topic
Thirteen of sixteen MCP sidecar entries carried no enabled at all, so
collect_role_resources fell back to _looks_like_container and billed every
one of them as running. Three roles already gated theirs on mcp.enabled;
the rest now do the same, gitea twice because it is the only role with a
vendor container behind the adapter.

The fifteen adapter roles then read services.<key>.enabled instead of
mcp.enabled, so the compose block and the task gates follow the services
entry rather than running beside it on a second path. The six plugin and
native roles keep reading the topic: they ship no sidecar entry to point at.

The three-level resolution is not new. KEYCLOAK_LOGOUT_PANEL_ENABLED has
the same shape and depth and gates a task the same way, and the same value
reaches JAVASCRIPT_SERVICE_ENABLED, where service-gating.js throws on
anything but "true" or "false" — an unresolved chain would have been
killing keycloak's Playwright run since 575a5a87ac.

This does not change what the resource model counts: _is_enabled reads the
unrendered Jinja and still treats it as on. What it buys is one switch
instead of two, and a declaration that matches it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 17:42:33 +02:00

51 lines
2.7 KiB
YAML

---
application_id: web-app-jenkins
entity_name: "{{ application_id | get_entity_name }}"
swarm_stack_converge_retries: 600
JENKINS_IMAGE: "{{ lookup('config', application_id, 'services.jenkins.image') }}"
JENKINS_VERSION: "{{ lookup('config', application_id, 'services.jenkins.version') }}"
JENKINS_CONTAINER: "{{ lookup('config', application_id, 'services.jenkins.name') }}"
JENKINS_CASC_FILE: "{{ [ lookup('container', application_id, 'directories.instance'), 'casc.yaml' ] | path_join }}"
JENKINS_OIDC_ENABLED: "{{ lookup('config', application_id, 'services.sso.enabled') }}"
JENKINS_LDAP_ENABLED: "{{ lookup('config', application_id, 'services.ldap.enabled') }}"
JENKINS_LOOPBACK_URL: "http://localhost:{{ lookup('config', application_id, 'services.jenkins.ports.internal.http') }}"
JENKINS_MCP_ENABLED: "{{ lookup('config', application_id, 'services.jenkinsmcp.enabled') | bool }}"
JENKINS_MCP_USERNAME: "{{ lookup('config', application_id, 'mcp.credential.owner') }}"
JENKINS_MCP_TOKEN_NAME: "infinito-mcp"
JENKINS_MCP_TOKEN_FILE: "/var/jenkins_home/secrets/infinito-mcp.token"
JENKINS_MCP_IDENTITY_URL: "{{ JENKINS_LOOPBACK_URL }}/whoAmI/api/json"
JENKINS_MCP_READY_URL: "{{ JENKINS_LOOPBACK_URL }}/login"
JENKINS_MCP_PLUGIN_PATH: "{{ lookup('config', application_id, 'mcp.adapter.upstream_path') }}"
JENKINS_MCP_URL: "{{ JENKINS_LOOPBACK_URL }}{{ JENKINS_MCP_PLUGIN_PATH }}"
JENKINS_MCP_CONTAINER: "{{ lookup('config', application_id, 'services.jenkinsmcp.name') }}"
JENKINS_MCP_PORT: "{{ lookup('config', application_id, 'services.jenkinsmcp.ports.internal.http') }}"
JENKINS_MCP_INSTANCE_DIR: "{{ [lookup('container', application_id, 'directories.instance'), 'mcp'] | path_join }}"
JENKINS_MCP_BEARER: "{{ lookup('config', application_id, 'secrets.credentials.mcp_bearer') }}"
JENKINS_MCP_UPSTREAM_URL: "http://{{ entity_name }}:{{ lookup('config', application_id, 'services.jenkins.ports.internal.http') }}{{ JENKINS_MCP_PLUGIN_PATH }}"
JENKINS_MCP_UPSTREAM_AUTH_HEADER: "Authorization"
JENKINS_MCP_UPSTREAM_AUTH_FORMAT: "Basic {key}"
JENKINS_MCP_CONTRACT:
upstream_kind: mcp
provider: "{{ application_id }}"
upstream_url: "{{ JENKINS_MCP_UPSTREAM_URL }}"
auth_subject: "{{ lookup('config', application_id, 'mcp.auth_subject') }}"
mutating_tools_enabled: "{{ lookup('config', application_id, 'mcp.tools.mutating_tools_enabled') | bool }}"
tools: "{{ lookup('file', 'mcp/tools.json') | from_json }}"
limits: "{{ lookup('config', application_id, 'mcp.limits') }}"
schema_sha256: "{{ lookup('config', application_id, 'mcp.tools.schema_sha256') }}"
JENKINS_MCP_INITIALIZE_PAYLOAD:
jsonrpc: "2.0"
id: 1
method: initialize
params:
protocolVersion: "2025-03-26"
capabilities: {}
clientInfo:
name: infinito-nexus
version: "1.0.0"