Pipeline Triggers
Pipeline Triggers
Section titled “Pipeline Triggers”Triggers determine when a pipeline runs. FlightStack supports multiple trigger types, and a single pipeline can have multiple triggers.
Trigger Types
Section titled “Trigger Types”Manual
Section titled “Manual”Run the pipeline on demand by clicking a button.
Configuration: None required
Use cases:
- Production deployments
- Ad-hoc builds
- Testing pipeline changes
On Push
Section titled “On Push”Run when code is pushed to matching branches.
Configuration:
| Option | Description | Example |
|---|---|---|
| Branch Filter | Regex pattern for branches | main, develop, feature/.* |
Examples:
main- Only main branchmain\|develop- Main or developfeature/.*- Any feature branch.*- All branches
On Tag
Section titled “On Tag”Run when a Git tag is created.
Configuration:
| Option | Description | Example |
|---|---|---|
| Tag Pattern | Regex for tag names | v[0-9]+\.[0-9]+\.[0-9]+ |
Examples:
v.*- Any tag starting with vv[0-9]+\.[0-9]+\.[0-9]+- Semantic versions (v1.0.0)release-.*- Release tags
On PR (Pull Request)
Section titled “On PR (Pull Request)”Run when a pull request is opened, synchronized, or reopened.
Configuration:
| Option | Description | Example |
|---|---|---|
| Source Branch | PR source branch filter | feature/.* |
| Target Branch | PR target branch filter | main |
Events:
- PR opened
- New commits pushed to PR
- PR reopened after closing
Scheduled
Section titled “Scheduled”Run on a cron schedule.
Configuration:
| Option | Description | Example |
|---|---|---|
| Cron Expression | Standard cron format | 0 2 * * * |
| Timezone | Timezone for schedule | UTC, America/New_York |
Cron Format:
┌───────────── minute (0 - 59)│ ┌───────────── hour (0 - 23)│ │ ┌───────────── day of month (1 - 31)│ │ │ ┌───────────── month (1 - 12)│ │ │ │ ┌───────────── day of week (0 - 6) (Sunday = 0)│ │ │ │ │* * * * *Common schedules:
| Schedule | Cron | Description |
|---|---|---|
| Nightly | 0 2 * * * | 2 AM daily |
| Weekly | 0 2 * * 1 | 2 AM Mondays |
| Hourly | 0 * * * * | Every hour |
Multiple Triggers
Section titled “Multiple Triggers”A pipeline can have multiple triggers. Any matching trigger will start the pipeline.
┌──────────┐ ┌──────────┐ │ On Push │ │ On Tag │ │ (main) │ │ (v*) │ └────┬─────┘ └────┬─────┘ │ │ └───────┬────────┘ │ ▼ ┌─────────┐ │ Build │ └─────────┘Trigger Variables
Section titled “Trigger Variables”Triggers provide context variables available in jobs:
| Variable | Description |
|---|---|
{{trigger}} | Trigger type (push, tag, pr, etc.) |
{{branch}} | Branch name |
{{tag}} | Tag name (for tag triggers) |
{{commit}} | Commit SHA |
{{commitMessage}} | Commit message |
{{author}} | Commit author |
Active vs Inactive
Section titled “Active vs Inactive”Each trigger has an active/inactive toggle:
- Active: Trigger will start pipeline runs
- Inactive: Trigger is configured but won’t fire
This lets you temporarily disable triggers without removing them.
Best Practices
Section titled “Best Practices”- Use specific branch patterns - Avoid
.*for pushes; be selective - Separate production triggers - Use manual for production, auto for staging
- Add PR triggers for validation - Run tests on every PR
- Schedule off-peak - Run nightly builds during low-usage hours