u/Moist-Program-1174

▲ 0 r/gitlab

GitLab CI - Conditionally create downstream jobs based on runtime result?

Hi all,

I have a GitLab CI pipeline where the first job checks whether updates are available (for example, newer dependencies/releases).

If updates exist → I want the subsequent jobs to run (build, package, publish, etc.)

If no updates exist → I want those jobs to not be created/run at all (not just run and immediately exit with “nothing to update”).

Something like:

check_updates
   ↓
if update found:
   build
   package
   publish

if no update:
   stop here

I already looked at dotenv artifacts, but as I understand it, rules are evaluated at pipeline creation time, so runtime variables/artifacts can’t affect job creation. rules:exists also seems to only work with repo files, not artifacts created by previous jobs.

What’s the cleanest GitLab-native way to achieve this?

  • Dynamic child/downstream pipeline generated by the first job?
  • Some workflow:rules trick?
  • Another pattern I’m missing?

Curious how others solve “runtime discovery → conditionally create jobs” in GitLab CI.

Thanks!

reddit.com
u/Moist-Program-1174 — 14 days ago

Almost every post I see about managing cables in a desk setup, people have their desk away from the wall, which makes it much easier.

However, I like my desk pushed to the wall as much as possible.

Is there a tutorial on how to manage desk cables when you want the desk close to the wall?

reddit.com
u/Moist-Program-1174 — 20 days ago