Services & Environments
Services define what you are deploying; environments define where. Together they configure the deployment target for a Harness 3.0 pipeline stage.
Services and Environments are core deployment concepts in Harness 3.0. A Service defines what you are deploying (application, container, function), and an Environment defines where you are deploying (dev, staging, production). Together, they configure the deployment target for a pipeline stage.
Services
A Service represents the application or workload being deployed. It includes artifact references, manifests, configuration files, and variables that define the deployment payload.
Service schema
interface Service {
// Reference to a defined service entity
ref: string
// Inline service definition
name: string
// Service description
description: string
// Deployment type (kubernetes, native-helm, serverless, etc.)
deployment_type: string
// Artifact configuration
artifacts: ArtifactConfig
// Manifest configuration
manifests: ManifestConfig[]
// Config files
config_files: ConfigFile[]
// Service-level variables
variables: Record<string, string>
}Service definition
Define a service inline within the pipeline or reference a pre-configured service entity.
Single service reference
Reference a service defined at the project, organization, or account level. Service and environment can be specified at either the pipeline level or the stage level.
Multiple service references
Deploy multiple services in a single pipeline. By default, services are deployed in parallel.
Sequential service deployment
Deploy services one at a time in a defined order using the sequential flag.
Environments
An Environment represents a deployment target such as development, staging, or production. Environments define infrastructure mappings, overrides, and governance policies.
Environment schema
Environment types
production
Live customer-facing environments. Requires approvals and freeze window compliance.
Approval gates, freeze windows, audit logging enforced.
non-production
Development, testing, and staging environments. Lighter governance requirements.
Optional approvals, no freeze window enforcement by default.
Environment definition
Reference an environment by name and specify the infrastructure to deploy to using the deploy-to field.
Multi-service deployment
Deploy multiple services to the same environment in a single stage. Services can be deployed in parallel (default) or sequentially.
Parallel service deployment
All services deploy simultaneously, reducing total deployment time. This is the default behavior when using items.
Sequential service deployment
Deploy services one after another, useful when services have startup order dependencies.
Multi-environment deployment
Deploy the same service across multiple environments, such as promoting a release from staging to production through a sequence of environment targets.
Sequential environment deployment
Promote a release through multiple environments sequentially. Use sequential: true on the environment and the deploy-to field to specify infrastructure targets per environment.
Complete multi-service, multi-environment deployment
A comprehensive example combining multiple services and environments in a single pipeline.
Last updated
Was this helpful?