Setting Budgets
This guide helps you establish effective CI/CD budgets and use CICosts alerts to stay within them.
Why Budget?
The Problem
Without budgets:
- Costs creep up unnoticed
- Spikes aren't caught until the bill arrives
- No accountability for CI spending
- Hard to plan and allocate resources
The Solution
With CICosts budgets:
- Set clear spending limits
- Get alerted before overruns
- Track against targets in real-time
- Hold teams accountable
Setting Your First Budget
Step 1: Understand Current Spending
Before setting a budget, analyze your spending:
- Go to CICosts Dashboard
- Select last 3 months of data
- Note:
- Average monthly cost
- Peak monthly cost
- Month-over-month trend
Step 2: Determine Budget Type
Choose the right budget approach:
| Type | Best For |
|---|---|
| Fixed | Predictable workloads |
| Trending | Growing projects |
| Per-repo | Cost allocation |
| Per-team | Decentralized control |
Step 3: Set the Amount
For a fixed budget:
Budget = (Average Monthly Cost × 1.2) + Buffer
Example:
- Average: $1,000/month
- 20% growth allowance: $1,200
- 10% buffer: $1,320
- Budget: $1,320/month
Step 4: Configure Alerts
Set up layered alerts:
| Alert | Threshold | Action |
|---|---|---|
| Early warning | 50% of budget | Monitor |
| Attention needed | 75% of budget | Investigate |
| Critical | 90% of budget | Immediate action |
| Exceeded | 100% of budget | Escalate |
Budget Strategies
Fixed Monthly Budget
Set a hard limit:
Monthly budget: $2,000
Alert at: $1,500 (75%)
Critical at: $1,800 (90%)
Pros:
- Simple to understand
- Clear accountability
- Easy to track
Cons:
- May be too rigid
- Doesn't account for growth
Trending Budget
Adjust based on growth:
Base budget: $1,500
Growth allowance: 10%/month
Month 1: $1,500
Month 2: $1,650
Month 3: $1,815
Pros:
- Scales with project
- More realistic
Cons:
- Harder to plan
- May mask inefficiency
Per-Repository Budget
Allocate to repos:
Total budget: $3,000
api-service: $1,500 (50%)
web-app: $900 (30%)
mobile-app: $600 (20%)
Pros:
- Clear ownership
- Enables accountability
- Easier optimization
Cons:
- More alerts to manage
- Need to rebalance
Per-Team Budget
Allocate to teams:
Total budget: $5,000
Frontend team: $1,500
Backend team: $2,000
Mobile team: $1,000
DevOps team: $500
Pros:
- Team accountability
- Encourages optimization
- Supports chargeback
Cons:
- Org structure changes
- Cross-team workflows
Alert Configuration
Creating Budget Alerts
- Go to Dashboard → Alerts
- Click Create Alert
- Configure:
Name: Monthly Budget Warning
Type: Threshold
Scope: Organization
Metric: Monthly spend
Threshold: $1,500
Notification: Email + Slack
Alert Best Practices
Use multiple thresholds:
50% - Informational (email only)
75% - Warning (email + Slack)
90% - Critical (email + Slack + page)
100% - Exceeded (all channels)
Set appropriate cooldowns:
50% alert: No cooldown (once)
75% alert: 24 hours
90% alert: 4 hours
100% alert: 1 hour
Tracking Budget Progress
Dashboard View
The CICosts dashboard shows:
- Current spend vs. budget
- Percentage consumed
- Projected month-end
- Days remaining
Budget Reports
Weekly budget reports include:
- Current spend
- Budget remaining
- Burn rate
- Projection
When Budget is Exceeded
Immediate Actions
- Investigate - Find the cause
- Stop bleeding - Cancel expensive runs if needed
- Communicate - Alert stakeholders
- Document - Record what happened
Root Cause Analysis
Common causes:
| Cause | Solution |
|---|---|
| Runaway workflow | Fix or disable |
| New project | Adjust budget |
| Legitimate growth | Request increase |
| Inefficiency | Optimize |
Requesting Budget Increase
Prepare your case:
- Document current spending
- Explain the cause
- Show optimization efforts
- Propose new budget
- Commit to monitoring
Budget Review Cycle
Monthly Review
Each month:
- Compare actual vs. budget
- Identify variances
- Adjust for next month
- Update stakeholders
Quarterly Planning
Each quarter:
- Analyze trends
- Forecast next quarter
- Reallocate if needed
- Set new targets
Budget Templates
Startup Template
Budget: $500/month
Alert 1: $350 (70%) - Email
Alert 2: $450 (90%) - Email + Slack
Growth Company Template
Budget: $2,500/month
Alert 1: $1,250 (50%) - Email
Alert 2: $1,875 (75%) - Email + Slack
Alert 3: $2,250 (90%) - All channels
Enterprise Template
Total: $10,000/month
Per-team:
- Platform: $4,000
- Product: $3,000
- Mobile: $2,000
- Other: $1,000
Alerts at 75%, 90%, 100% per team
Next: Team Management →