Skip to main content

Workflow

A Workflow is a platform-engineer-defined template for running automation — most commonly a CI build that turns a developer's source into a container image, but equally provisioning, ETL, or end-to-end tests. It pairs an openAPIV3Schema parameter surface with an inline Argo Workflow spec, so you write the steps and lock the policy while developers supply only a repo URL and a branch. Workflows execute on the workflow plane.

A ClusterWorkflow is the cluster-scoped variant — ship shared builders as ClusterWorkflows.

KindWorkflow / ClusterWorkflow
API groupopenchoreo.dev/v1alpha1
ScopeNamespaced / Cluster
AudiencePlatform engineer
Referenced byComponent (spec.workflow), gated by ComponentType allowedWorkflows
Executed asWorkflowRun on the workflow plane

Key spec fields

FieldWhat it does
spec.parameters.openAPIV3SchemaDeveloper-facing inputs (repo URL, branch, timeout)
spec.runTemplateAn inline Argo Workflow manifest with CEL ${...} injection, composing the build steps
spec.resources[]Extra objects created in the workflow plane (e.g. an ExternalSecret for Git creds)
spec.externalRefs[]References to external CRs (e.g. SecretReference) resolved into the CEL context
spec.ttlAfterCompletionHow long completed runs are retained before cleanup

Every value in the runTemplate is developer-provided (${parameters.*}), hard-coded (a literal you set — your governance lever), or system-generated (${metadata.*}). A component (CI) workflow is one that carries openchoreo.dev/workflow-type: "component", is referenced by a component, and is listed in its ComponentType's allowedWorkflows.

Create in the portal

  1. Open Create…Platform ResourcesClusterWorkflow (or Workflow for namespace scope).
  2. In the in-portal YAML editor, define the parameter schema and the inline Argo runTemplate.
  3. Click Create. Allow it on a ComponentType via allowedWorkflows so components can build with it.

A WorkflowRun (one execution) is triggered by a Git webhook, the console, or occ — not authored here. Full guide: Workflows.

Example

apiVersion: openchoreo.dev/v1alpha1
kind: ClusterWorkflow
metadata:
name: gcp-buildpacks-builder
labels:
openchoreo.dev/workflow-type: "component"
spec:
parameters:
openAPIV3Schema:
type: object
required: [repository]
properties:
repository:
type: object
properties:
url:
type: string
x-openchoreo-component-parameter-repository-url: true
runTemplate:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: ${metadata.workflowRunName}
namespace: ${metadata.namespace}
spec:
entrypoint: build-workflow
# … arguments mixing ${parameters.*}, ${metadata.*}, and hard-coded policy …
ttlAfterCompletion: "7d"

The x-openchoreo-component-parameter-repository-* vendor extensions mark the repo coordinates so the platform can drive auto-build (a Git webhook triggering a build on push).

WorkflowRun

A WorkflowRun is a single execution of a Workflow with concrete parameters. It's created by a Git webhook (auto-build), the console, or occ — and is imperative (it triggers an action, not desired state), so WorkflowRuns should not be committed to a GitOps repo. The platform renders the Workflow's runTemplate into a real Argo Workflow on the workflow plane per run.

KindWorkflowRun
ScopeNamespaced
Labels (CI)openchoreo.dev/component, openchoreo.dev/project

See also