cicd_propose_application_pipeline
Render the canonical Ankra CI/CD pipeline (Kubernetes manifests + application descriptor + the CI definition + optionally a Dockerfile) for a target repository. The CI definition and manifest YAML are rendered server-side from a fixed Ankra template - you DO NOT write them yourself; you only provide the tailoring fields and the Dockerfile string. Returns the rendered files plus a list of validator violations and a severity. If severity is 'warn' or 'fatal', revise the tailoring (or Dockerfile) and call again. When severity is 'ok', commit the returned files via github_create_pull_request. Read-only - no commits happen here.
Supports two shapes:
Single-app (default): pass top-level app_name + tailoring (+ optional dockerfile). The manifests go to .ankra/manifests/, the application descriptor to .ankra/ankra.yaml, and the CI definition to .ankra/pipeline.yaml (or .github/workflows/build-and-publish.yml when target is 'github_actions').
Monorepo (multi-app): pass the apps array with one entry per deployable app. Each app gets its own manifests under .ankra/manifests/-*.yaml, its own descriptor at .ankra/-ankra.yaml, and its own Dockerfile at <app_subdir>/Dockerfile. By default every app's stages are grouped into the one .ankra/pipeline.yaml a repository holds (with a paths: filter scoped to each app's subdir); pass target 'github_actions' for one workflow per app at .github/workflows/-build-and-publish.yml instead. Use the apps shape when the repo has signals like workspaces (in package.json), nx.json, turbo.json, lerna.json, multiple existing Dockerfiles, or multiple top-level app/service directories each with their own dependency manifests.
CI definition target: 'target' picks what the proposal's CI definition is. 'ankra_pipeline' renders .ankra/pipeline.yaml, which Ankra runs inside the cluster, and is the default for both shapes - a monorepo's several apps are grouped into the one file, each under its own component-suffixed stages. 'github_actions' renders the legacy generated workflow(s) instead, for a repository that must keep building on GitHub. Everything else in the proposal - the Dockerfile, the descriptor, the manifests - is identical either way.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apps | No | MONOREPO shape. List of apps in the repository, one entry per deployable app. When provided (and non-empty), the single-app fields (app_name, tailoring, dockerfile) are ignored. Every app must have a unique non-empty app_subdir. | |
| repo | Yes | Repository name (used as the container image repository path). | |
| owner | Yes | Repository owner (e.g. 'octocat'). Prefer the exact owner from a prior github_list_repositories call. | |
| branch | Yes | Branch the workflow's 'on: push' trigger should fire for (typically the repo's default branch). | |
| target | No | OPTIONAL. Which CI definition the proposal carries. 'ankra_pipeline' renders .ankra/pipeline.yaml, the definition Ankra's own pipeline engine runs inside the cluster - use it for every new repository, single-app or monorepo. 'github_actions' renders the legacy .github/workflows/build-and-publish.yml instead (one file per app in the monorepo shape), unchanged, for a repository that must keep building on GitHub. Omitted, both shapes default to 'ankra_pipeline': the monorepo (apps) shape groups every app's stages into the one .ankra/pipeline.yaml a repository holds, each under its own component-suffixed stage names. | |
| app_name | No | SINGLE-APP shape only. Human-readable application name. Used in the manifest metadata; lowercased and dashed for the resource's safe name. Ignored when 'apps' is provided. | |
| tailoring | No | SINGLE-APP shape only. Per-repo customisation for the canonical Ankra workflow + Kubernetes manifests. Everything else (security scanning, multi-arch build, GHCR image publishing, package visibility) is locked in the canonical template and does NOT need to be specified. Ignored when 'apps' is provided. | |
| dockerfile | No | SINGLE-APP shape only. OPTIONAL full Dockerfile content. When provided, included verbatim in the returned files list as 'Dockerfile' (path). When the target repo already has a Dockerfile and you don't want to overwrite it, omit this field. Ignored when 'apps' is provided. |