.flamio.yml reference
BetaEvery key of .flamio.yml, the file that keeps your Flamio delivery rules in your repository — its type, what it does and each preset's value.
.flamio.yml keeps the rules of How Flamio runs your delivery in your repository, next to your code. It sits at the root of the repository, on the default branch. On a connected GitHub or Bitbucket repository, Flamio reads it from there by itself on every push; from any other host, your pipeline applies it with the flamio CLI. Flamio never commits to your repository. The tables below are built from the same schema Flamio checks the file against.
The file's first line points your editor at the schema, https://flamio.org/schemas/flamio-config/v1.json, so VS Code and JetBrains editors with a YAML plugin complete keys and flag mistakes as you type.
The smallest file
# yaml-language-server: $schema=https://flamio.org/schemas/flamio-config/v1.json
version: 1
project: 3f6c1d2e-8a41-4b7e-9c0d-5e2f7a9b1c34
extends: balanced
Every key you leave out takes its value from the preset in extends. project is your project's id: YAML > Download on Delivery > Rules writes it for you.
The whole file
Every key, each at its Balanced value, with one environment of each kind:
# yaml-language-server: $schema=https://flamio.org/schemas/flamio-config/v1.json
version: 1
project: 3f6c1d2e-8a41-4b7e-9c0d-5e2f7a9b1c34
extends: balanced
pull_requests:
check:
mode: on
into: []
on: preview
tasks: from_change
stop_outdated: true
scenarios: []
width: desktop
access: read_only
budget_tokens: auto
publish:
status: true
comment: true
block_merges:
mode: dry_run
min_severity: critical
pages: []
when_not_checked: block
skip_paths:
mode: on
paths: [ "**/*.md", docs/**, .github/** ]
staging:
check:
mode: on
environments: []
audit: whole_site
tasks: from_pull_requests
scenarios: []
width: desktop
budget_tokens: auto
production:
check:
mode: on
tasks: none
compare_with: baseline
environments:
preview:
kind: preview
names: [ preview ]
url_pattern: "*-acme.vercel.app"
staging:
kind: staging
names: [ staging ]
branch: dev
url: https://staging.shop.example.com
production:
kind: production
names: [ production ]
branch: main
url: https://shop.example.com
hosts: [ shop.example.com, www.shop.example.com ]
access:
test_account: none
preview_protection: none
environment_scope: with_staging
The top of the file
Prop
Type
Pull requests
Check pull requests
Prop
Type
Block merges
Prop
Type
Skip docs-only changes
Prop
Type
Staging
Check staging
Prop
Type
Production
Check production
Prop
Type
Environments
Each key under environments is one environment. Leave the section out and Flamio keeps the environments it found in your deploys; name one and the file sets it: a deploy reported under one of its names, or a preview your pipeline reports at an address matching its url_pattern, lands in it, and its kind, address and hosts stay as the file says.
Name only the environments you have: a project with production alone names one, a project with dev, QA, UAT and staging names five. A file names up to 20, exactly one of them kind: production; several production hosts go under that one's names and hosts. Delivery draws the lanes in the order of the keys, so list them in the order a change moves through them. Without the section, the lanes go dev, then test or QA, then UAT, then stage or staging, then the rest in the order Flamio first saw them.
Prop
Type
What Delivery shows
environment_scope gives the answer of the Environments step of the setup. production_only keeps your staging environments off Delivery, and no staging deploy is checked while it holds, whatever staging.check says; the file's staging.check itself stays as written. with_staging shows them, and staging.check decides what is checked. While the file sets the key, the answer on Delivery is read-only. Leave the key out and the answer stays as it is.
Access
How Scout gets into your site. Leave the section out and access stays as it is.
Prop
Type
test_account names the project's test account; the login and password stay in Settings > Project. A preview_protection names a secret stored in Flamio, never its value. Save the bypass on Delivery under Preview protection (see Let Scout into a protected preview): it is stored as preview-protection, so the file reads preview_protection: { header: x-vercel-protection-bypass, secret: preview-protection }. A file that names a secret Flamio does not have is refused.
Check and apply your file
The flamio CLI reads .flamio.yml from the current directory and needs FLAMIO_CI_KEY:
| Command | What it does |
|---|---|
flamio config validate | Checks the file. |
flamio config plan [--detailed-exitcode] | Shows what applying it would change. |
flamio config apply | Applies it. The key needs Can change delivery settings — see Apply the file from your pipeline. |
flamio config pull [--full] | Writes the rules as they run now; --full writes every key. |
--file <path> reads another file, --ref <branch> names the branch it comes from (default: your CI's branch), and --expect-revision <n> makes apply refuse when someone changed the rules since revision n.
| Exit | Means |
|---|---|
0 | The file is valid; nothing to change, or applied. |
1 | The file is invalid, or Flamio refused it. |
2 | plan --detailed-exitcode only: applying it would change something. |
4 | The step is set up wrong — no key, a revoked key, a key of another project, or one without Can change delivery settings. |
Errors
An invalid file changes nothing: the rules keep running as they were. Each error names its line and column, the key and what is wrong:
.flamio.yml:7:19 min_severity: "low" — expected critical, high, mediumA key Flamio does not know is an error, not ignored, so a typo cannot pass silently. A key of a later version says it is not available yet. On Delivery > Rules, a file that failed shows its errors above the rules. On GitHub and Bitbucket, the commit's "Flamio config" check fails with each error on its line, and flamio config plan warns that the last file did not apply.
A repository holds one of .flamio.yml and .flamio.yaml: both at once is an error. The file's project must be a project the repository is connected to.
Related
How Flamio runs your delivery
The rules Flamio follows at each step of a change — what it checks, when a pull request may not merge, what it skips — and where you set them.
Connect GitHub
Install the Flamio app on GitHub to see every pull request and deploy on Delivery, and Flamio Scout results on their commits.