Skip to content
Latchkey

What Is an Environment Scope?

An environment scope is a filter that ties a variable or configuration to one or more named environments, so it takes effect only for jobs targeting a matching environment. It lets the same setting name resolve differently per environment. It is how a single pipeline keeps per-environment values separate.

Why it matters

A deploy pipeline needs different endpoints and credentials for staging versus production, expressed without duplicating the whole pipeline. Environment scope binds each value to its environment so the right one is injected automatically. This prevents a job from picking up a value meant for a different environment.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →