November 12, 2025

Config Wars: Choose Your Fighter

Dynamically include files in GitLab-CI

GitLab trick loads settings on the fly — fans cheer, skeptics drop the Jurassic Park meme

TLDR: A GitLab tip shows how to load a versioned settings file during a build by passing one variable. Commenters split between “read the docs” pragmatists and a Jurassic Park meme warning about complexity, framing it as a debate between speedy flexibility and the need for strict safeguards.

A neat GitLab how-to just dropped: trigger a build and choose which settings file to load based on a version number, so your pipeline grabs .gitlab/vars/1.0.yml or 2.0.yml on command. In plain English: you push a button, pass a number, and your build uses the right recipe. It’s a power move for teams juggling many releases—and the demo was super simple.

But the comments? Pure split-screen energy. One camp went full practical, led by turtleyacht, who posted the GitLab includes docs like a mic drop: it’s already in the manual, folks. The other camp brought popcorn and memes: xyzzy123 rolled in with the classic Jurassic Park line about being “so preoccupied with whether they could… if they should,” turning a cute trick into a cautionary tale. The vibe: convenience vs. consequences. Fans love the flexibility; skeptics worry that letting an external call pick which file to load could invite chaos—wrong configs, brittle setups, or security oopsies if not locked down. The meme energy was high, but so was the message: great power needs guardrails. Whether you see this as a time-saver or a foot-gun, the thread turned a tidy tip into a philosophical showdown on keeping builds fast, clean, and safe.

Key Points

  • Variables are stored in versioned YAML files under .gitlab/vars/ (e.g., 1.0.yml, 2.0.yml).
  • GitLab CI’s include keyword is used with a variable-expanded local path (.gitlab/vars/$VERSION.yml).
  • LONG_VERSION and SHORT_VERSION are examples of variables defined in the YAML files.
  • Pipelines are triggered via the GitLab API, passing CI/CD variables such as VERSION.
  • A curl POST request demonstrates how to supply token, ref, and variables to select the desired include file.

Hottest takes

"Gitlab Docs: https://docs.gitlab.com/ci/yaml/includes/" — turtleyacht
"whether they could, they didn't stop to think if they should" — xyzzy123
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.