Releases and Jobs
This guide explains how Ctrlplane turns deployment versions into actual deployments through releases and jobs.Overview
The flow from version to execution:Release
A Release represents the intent to deploy a specific version to a specific release target (Deployment × Environment × Resource).Release Properties
Release Status
pending- Waiting for policies (approval, environment progression)approved- Policies satisfied, job createdactive- Job is currently executingcompleted- Job finished successfullyfailed- Job failedcancelled- Release was cancelled
How Releases are Created
Releases are created automatically by Ctrlplane when:- A new deployment version is created with status
ready - Ctrlplane evaluates which release targets should receive this version
- For each target, a release is created
- Policies are evaluated to determine if the release can proceed
Release Lifecycle
Viewing Releases
Via Web UI:- Navigate to deployment
- Click “Releases” tab
- See all releases with their status
Release Variables
Releases have resolved variables from:- Deployment variables (with environment-specific values)
- Resource variables
- Version config
Cancelling Releases
Cancel a pending or active release:Job
A Job is the actual deployment task that gets executed by a job agent. Jobs are created from approved releases.Job Properties
Job Status
pending- Job created, waiting for agent to pick uptriggered- Job dispatched to external system (e.g., GitHub Actions)in_progress- Job is currently executingcompleted- Job finished successfullyfailed- Job failedcancelled- Job was cancelledskipped- Job was skippedinvalid_job_agent- Job agent configuration invalid
Job Lifecycle
Job Configuration
Jobs receive configuration from multiple sources (in priority order):- Version’s jobAgentConfig (highest priority)
- Deployment’s jobAgentConfig
- Resolved variables
- Release context (environment, resource info)
Job Agents
Job agents are responsible for:- Polling for new jobs (
GET /job-agents/{agentId}/queue/next) - Acknowledging jobs
- Executing the deployment
- Reporting status updates
- Marking job as completed or failed
- GitHub Actions - Triggers GitHub workflow
- Kubernetes - Creates Kubernetes Job
- ArgoCD - Syncs ArgoCD Application
Job Execution Flow
1. Job Agent Polls
2. Agent Acknowledges Job
3. Agent Executes Deployment
The agent uses the job configuration to perform the deployment: Kubernetes Agent Example:4. Agent Updates Status
As the deployment progresses:External Job IDs
When job agents trigger external systems (like GitHub Actions), they can store the external job ID:Job Retry
If a job fails, you can create a new job for the same release:Viewing Jobs
Via Web UI:- Navigate to deployment
- Click “Jobs” tab
- See execution history with status
Version → Release → Job Example
Let’s walk through a complete example:1. CI Creates Version
2. Ctrlplane Creates Releases
Ctrlplane finds release targets:- API Service → Production → cluster-1
- API Service → Production → cluster-2
pending (waiting for approval policy).
3. User Approves
approved status.
4. Ctrlplane Creates Jobs
Two jobs created:job_1for cluster-1job_2for cluster-2
pending
5. Job Agent Polls
6. Agent Processes Jobs
For each job:7. Releases Updated
Both releases now status:completed
Release Sequencing
By default, when a new version is created for a deployment:- Existing jobs for older versions may be cancelled
- New jobs are created for the new version
Sequential Releases
Ensure releases happen one at a time:Parallel Releases
Allow multiple versions to deploy concurrently:Deployment Tracing
For detailed observability, use the trace API to report execution steps:Best Practices
Job Status Updates
Do:- ✅ Acknowledge jobs immediately when picked up
- ✅ Update status regularly during execution
- ✅ Provide descriptive messages
- ✅ Mark as completed or failed explicitly
- ❌ Leave jobs in pending state indefinitely
- ❌ Skip acknowledging jobs
- ❌ Provide generic error messages
Error Handling
When jobs fail:- Set status to
failed - Include detailed error message
- Store external job ID for log access
- Consider automatic retry logic in agent
Release Management
- Monitor pending releases (awaiting approval)
- Set up notifications for failed jobs
- Regularly review release history
- Clean up old completed releases (retention policy)
Troubleshooting
Releases stuck in pending
- Check if policies require approval
- Review policy evaluation results
- Verify environment progression requirements met
- Check for blocking policy rules
Jobs not being picked up by agent
- Verify agent is running and polling
- Check agent ID matches deployment configuration
- Review job agent logs for errors
- Confirm agent has network access to API
Jobs fail immediately
- Review job agent configuration
- Check external system (GitHub, Kubernetes) availability
- Verify credentials/permissions
- Review job logs and error messages
Multiple jobs created for same release
- Check release sequencing configuration
- Review job creation logic
- May be intentional for retry scenarios
Next Steps
- Job Agents - Set up and configure job agents
- Policies - Control release approval and progression
- Deployment Tracing - Add detailed execution traces
- CI/CD Integration - Integrate version creation into your CI