For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create Phases

Learn how to create and configure phases in release processes

Phases are the fundamental building blocks of release processes in Release Orchestration. They represent major milestones or stages in your software delivery workflow, grouping related activities together to create logical, manageable segments of your release.

This guide covers how to create, configure, and organize phases to model your release workflows effectively.

Understanding Phases

Before creating phases, it's important to understand what they represent and how they structure your release process.

What is a Phase?

A phase is a logical grouping of activities that represents a major stage or milestone in your release process. Each phase:

  • Contains one or more activities that accomplish a specific goal

  • Has a clear purpose and deliverable (e.g., "Build completed", "Tests passed", "Deployment successful")

  • Can execute independently once its dependencies are met

  • Can run in parallel with other phases that have no dependencies

  • Tracks its own execution status and progress

Creating Phases

You can create phases using AI-based generation or manual configuration.

Using Harness AI

The fastest way to create phases is to use Harness AI, which automatically structures your release process based on your description.

  1. Navigate to Processes and click Create Process

  2. Provide a description of your release workflow

  3. Harness AI automatically:

    • Identifies logical phase groupings

    • Creates phases with appropriate names

    • Suggests phase owners

    • Determines phase dependencies

    • Generates activities within each phase

Example AI Prompt:

Manual Phase Creation

For more control over your process structure, you can create phases manually.

Step 1: Define Phase Purpose

Before creating a phase, clearly define:

Primary Goal

  • What milestone does this phase represent?

  • What deliverable or outcome does it produce?

Scope

  • What activities belong in this phase?

  • What work should NOT be in this phase?

Prerequisites

  • What must complete before this phase can start?

  • Which phases does this phase depend on?

Post-Phase Actions

  • What happens after this phase completes?

  • Which phases depend on this phase?

Ownership

  • Which team or role is responsible for this phase?

  • Who should be notified when this phase starts or completes?

Step 2: Add Phase to Process

Add the phase to your process using YAML or the UI.

Using YAML:

Using the UI:

  1. Navigate to your process

  2. Click + Add Phase

  3. Configure phase details:

    • Name: Descriptive name for the phase

    • Description: Explanation of the phase's purpose

    • Owners: Teams or individuals responsible

    • Dependencies: Phases that must complete first

  4. Save the phase

Step 3: Configure Phase Properties

Each phase has several configurable properties:

Basic Properties

Property
Description
Example

ID

Unique identifier (auto-generated)

build_phase

Name

Display name

Build and Package

Description

Purpose and scope

Compile source code and create artifacts

Ownership

Property
Description
Example

Owners

Teams or roles responsible

Development Team, DevOps Team

Dependencies

Property
Description
Example

depends-on

Phases that must complete first

[planning_phase, approval_phase]

Outputs (Advanced)

Property
Description
Example

outputs

Values to expose to later phases

BUILD_VERSION, ARTIFACT_URL

Configuring Phase Dependencies

Phase dependencies control execution order and ensure prerequisites are met before a phase begins.

Understanding Dependencies

Dependencies define the relationship between phases:

No Dependencies (depends-on: [])

  • Phase can start immediately when the release begins

  • Executes in parallel with other independent phases

Single Dependency

  • Phase waits for one other phase to complete

  • Creates a sequential execution chain

Multiple Dependencies

  • Phase waits for all specified phases to complete

  • Enables complex orchestration patterns

Dependency Patterns

Pattern 1: Linear Chain (Sequential Execution)

Each phase depends on the previous one, creating a straight line of execution.

Execution Flow:

When to use:

  • Simple release processes

  • When each phase must complete before the next begins

  • When phases produce outputs needed by subsequent phases

Pattern 2: Parallel Execution

Multiple phases with no dependencies execute simultaneously.

Execution Flow:

When to use:

  • Independent validation activities

  • To reduce total release duration

  • When phases don't share dependencies

Pattern 3: Fan-Out / Fan-In

One phase triggers multiple parallel phases, which then converge to a single phase.

Execution Flow:

When to use:

  • Multiple validation activities after a build

  • When deployment requires all validations to pass

  • Complex quality gates

Pattern 4: Multiple Independent Chains

Different release tracks that execute independently.

Execution Flow:

When to use:

  • Multi-service or multi-component releases

  • When services can deploy independently

  • When different teams own different components

Dependency Best Practices

Use Dependencies for Data Flow

When one phase produces outputs that another phase needs, use dependencies:

Minimize Dependencies for Speed

Only add dependencies when truly necessary. Unnecessary dependencies serialize execution and slow releases.

Unnecessary dependency:

Better:

Avoid Circular Dependencies

Never create circular dependencies (Phase A depends on Phase B, which depends on Phase A):

Adding Activities to Phases

Once a phase is created, add activities that accomplish the phase's goals.

Selecting Activities

Activities can come from:

Activity Store

  • Pre-built, reusable activities

  • Organization-wide templates

  • Harness-provided activities

Custom Activities

  • Activities you create for specific needs

  • Team-specific templates

  • One-off activities

Activity Organization Within Phases

Group Related Activities

Keep related activities in the same phase:

Configure Activity Dependencies

Activities within a phase can have dependencies:

Phase Configuration Examples

Example 1: Standard CI/CD Process

Example 2: Hotfix Release

Phase Naming Conventions

Use clear, consistent naming for phases to make your process easy to understand.

Action-Oriented Names

Focus on what the phase does. Good examples include Build and Package, Deploy to Production, and Run Integration Tests. Avoid vague names like Phase 1 or Stuff that don't convey the phase's purpose.

Environment-Specific Names

When deploying to environments, include the environment name in the phase identifier. Examples include Deploy to Staging, Production Deployment, and QA Environment Testing.

Milestone-Based Names

When representing checkpoints, use milestone-based names such as Code Complete, Testing Complete, and Release Ready.

Naming Consistency

Maintain consistent patterns across processes:

If using verb-noun format:

  • Build Application

  • Run Tests

  • Deploy Services

If using noun-verb format:

  • Application Build

  • Test Execution

  • Service Deployment

Custom Phase Scenarios

Phases can be customized for organization-specific needs.

Compliance-Driven Phases

For regulated industries:

Multi-Region Deployment Phases

For global releases:

Feature Flag Phases

For feature rollout:

Phase Execution Behavior

Understanding how phases execute helps you design effective processes.

Execution States

Phases progress through these states:

  1. Pending - Waiting for dependencies to complete

  2. Scheduled - Ready to start, waiting for resources

  3. Running - Actively executing activities

  4. Completed - All activities finished successfully

  5. Failed - One or more activities failed

  6. Paused - Execution paused (manual intervention or condition)

  7. Skipped - Phase was skipped based on conditions

Conditional Phase Execution

Phases can execute conditionally based on variables or expressions:

This phase only executes if the condition evaluates to true.

Troubleshooting Phase Configuration

Phase Doesn't Start

Symptom: Phase remains in "Pending" or "Scheduled" state.

Possible Causes:

  • Dependencies not met (check depends-on configuration)

  • Condition not satisfied (check if expressions)

  • Resource constraints (check system capacity)

Solution: Review dependencies and verify all prerequisite phases completed successfully.

Phases Execute Out of Order

Symptom: Phase starts before its dependencies complete.

Possible Causes:

  • Missing or incorrect depends-on configuration

  • Dependency references wrong phase ID

Solution: Verify depends-on lists correct phase IDs (case-sensitive).

Phase Takes Too Long

Symptom: Phase execution time is excessive.

Possible Causes:

  • Too many activities in one phase

  • Activities running sequentially when they could be parallel

  • Resource-intensive activities

Solution:

  • Split large phases into smaller, focused phases

  • Remove unnecessary activity dependencies to enable parallelism

  • Optimize activity configurations

Common Phase Examples

Different organizations structure their releases differently, but common phases include:

Build and Compilation

  • Checkout source code

  • Compile code

  • Run static analysis

  • Create artifacts

  • Package applications

Testing and Quality

  • Run unit tests

  • Execute integration tests

  • Perform security scans

  • Run performance tests

  • Generate test reports

Deployment

  • Deploy to staging

  • Deploy to production

  • Database migrations

  • Configuration updates

  • Service restarts

Validation and Verification

  • Smoke tests

  • Health checks

  • Data validation

  • Rollback verification

  • Monitoring setup

Compliance and Governance

  • Security approval

  • Change management approval

  • Compliance checks

  • Audit trail generation

  • Documentation updates

Last updated

Was this helpful?