CI Pipelines
Set up CI using ci-module-primer and optionally ci-golden-pipeline.
Module directories:
- •
ci-module-primer/— reusable CI templates - •
ci-golden-pipeline/— pre-built pipeline for a specific repo
$ARGUMENTS
What These Create
ci-module-primer (templates)
- •CI Stage Template — complete CI workflow stage
- •Step Group Templates:
- •Code Smells & Linting (static analysis, secrets scanning)
- •Build & Scan Container Image (Docker build, scan, push)
- •Supply Chain Security (SBOM generation, SLSA provenance, signing)
- •Supports both Harness Cloud and self-hosted Kubernetes execution
ci-golden-pipeline (per-repo pipeline)
- •Pre-built CI pipeline for a specific repository
- •Webhook triggers for automatic execution (GitHub, Bitbucket, or Harness Code)
- •Input sets with default branch configurations
- •Uses templates created by ci-module-primer
Conversation Flow
For ci-module-primer:
- •
Auto-detect org/project from upstream state:
bashcd harness-organization && tofu output -json 2>/dev/null cd harness-project && tofu output -json 2>/dev/null
- •
"Where should CI templates be deployed?" →
organization_id,project_id(can be account-level if both null) - •
"Will your CI pipelines run on self-hosted Kubernetes or Harness Cloud?"
- •Self-hosted → ask for
kubernetes_connectorandkubernetes_namespace - •Harness Cloud → set
kubernetes_connector = "skipped"
- •Self-hosted → ask for
- •
"Do you want Harness Code Repository support?" →
should_support_hcr(default: true) - •
Generate tfvars, init, plan, confirm, apply.
For ci-golden-pipeline (optional):
After deploying ci-module-primer, ask:
- •
"Do you want to create a CI pipeline for a specific repository now?"
- •
If yes, gather:
- •Pipeline name
- •Repository path (e.g.,
org/repo-name) - •Webhook type: GitHub, Bitbucket, or Harness Code
- •Branch patterns (optional — for trigger configuration)
- •Template location (auto-detect from ci-module-primer output)
- •
Generate tfvars, deploy.
Prerequisites
- •Organization and project recommended (but can deploy at account level)
- •
central-build-farm-setuprecommended for connector references - •
ci-module-primermust be deployed beforeci-golden-pipeline