Skip to content
Latchkey

Affinity - CI/CD Glossary Definition

Affinity steers a CI job toward runners that match a desired attribute.

Affinity is a scheduling rule that attracts a job to specific runners, for example placing a job near a warm cache or on a node with a required architecture or GPU.

Affinity rules express a preference or requirement that a job should run on runners with certain characteristics, such as an architecture, a label, or co-location with a cache.

In CI

Affinity is useful for keeping repeated jobs on a runner that already has a warm dependency cache, or pinning ARM builds to ARM runners.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →