Skip to main content

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:

  1. Go to CICosts Dashboard
  2. Select last 3 months of data
  3. Note:
    • Average monthly cost
    • Peak monthly cost
    • Month-over-month trend

Step 2: Determine Budget Type

Choose the right budget approach:

TypeBest For
FixedPredictable workloads
TrendingGrowing projects
Per-repoCost allocation
Per-teamDecentralized 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:

AlertThresholdAction
Early warning50% of budgetMonitor
Attention needed75% of budgetInvestigate
Critical90% of budgetImmediate action
Exceeded100% of budgetEscalate

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

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

  1. Go to DashboardAlerts
  2. Click Create Alert
  3. 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

  1. Investigate - Find the cause
  2. Stop bleeding - Cancel expensive runs if needed
  3. Communicate - Alert stakeholders
  4. Document - Record what happened

Root Cause Analysis

Common causes:

CauseSolution
Runaway workflowFix or disable
New projectAdjust budget
Legitimate growthRequest increase
InefficiencyOptimize

Requesting Budget Increase

Prepare your case:

  1. Document current spending
  2. Explain the cause
  3. Show optimization efforts
  4. Propose new budget
  5. Commit to monitoring

Budget Review Cycle

Monthly Review

Each month:

  1. Compare actual vs. budget
  2. Identify variances
  3. Adjust for next month
  4. Update stakeholders

Quarterly Planning

Each quarter:

  1. Analyze trends
  2. Forecast next quarter
  3. Reallocate if needed
  4. 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 →