Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 4
    keep in mind, it can duplicate pipelines docs.gitlab.com/ee/ci/jobs/…
    – anydasa
    Commented Apr 11, 2023 at 17:25
  • This severely limits how one can use rules though. Like if I am relying on rules to do various other things as well then it can be quite hard to massage them to also allow setting variables, since GitLab will only do anything with the first rule it matches.
    – Ben Farmer
    Commented Nov 22, 2023 at 4:17
  • Indeed, it is not super flexible, but in my experience it covers most needs. Check the other solution I propose - using a dotenv report. That one addressed the problem you describe, but introduces another one - these generated vars cannot be used in job definitions, only in scripts (and few other places) Commented Nov 23, 2023 at 10:51