ON-PREM CHOREO CLOUD BOTH

What it is

pr-check-pipeline is the automatic check that runs on pull requests in the repositories the CI/CD system watches. For wso2cloud-deployment it checks secrets, manifests, Terraform and OpenChoreo admission. For application repositories it builds and scans only the components that changed, without publishing anything. It reports the result back to GitHub as checks.

Like a pre-flight checklist: the plane is not allowed on the runway until every item is ticked, and nothing leaves the hangar during the checks.

Why it exists

Problems are cheaper to catch before merge. A merged change reaches dev automatically, so the pull request is the last easy gate.

How it works

  • A pull request opened or updated (synchronize) against a watched branch makes the pr-check sensor start a WorkflowRun. For wso2cloud-deployment the sensor lists main and the environment branches. For application repositories it lists main for most, and another branch such as develop or cloud-integration for some.
  • The run sets the check 'PR Build & Security Scan' to pending, starts a daemon that shows each step as its own check run, clones the pull request and simulates the merge.
  • It scans the pull request's commits with gitleaks. A secret found fails the check.
  • For wso2cloud-deployment it also runs kustomize build on the manifests (pull requests into main only), terraform fmt, TFLint and a Trivy infrastructure scan, and an OpenChoreo admission check. The Terraform and admission checks only run when the pull request touches the files they care about. The admission check renders the manifests and applies the OpenChoreo resources to a throwaway Kubernetes cluster that runs the same OpenChoreo chart version and its validating webhooks.
  • For other repositories it finds changed components and builds and scans them with publish switched off, so a vulnerable image fails the pull request before merge.
  • An exit handler finishes the per-step checks, sets the final status and sends notifications for components that asked for them.

Key facts

ClusterWorkflow
pr-check-pipeline
Sensor
pr-check
Started by
Pull request opened or synchronize
GitHub check
PR Build & Security Scan, plus one check run per step
Secret scan
gitleaks over the commits in the pull request
App repository builds
publish=false, so scan only
Namespace
cicd

Used by (2)