GitLab

Variable and artifact sharing in GitLab parent-child pipelines

Oct 16, 2025William Arias
Variable and artifact sharing in GitLab parent-child pipelines
SummaryAI, from the source post

This post details how to implement parent-child pipelines in GitLab CI/CD to manage complex workflows. It explains how to share variables between parent and child pipelines by saving them as `dotenv` artifacts in the parent job and then inheriting them in the child job using the `needs` keyword. It also briefly mentions sharing artifacts and introduces the `rules: changes` directive for optimizing child pipeline execution based on file changes. The post provides concrete YAML examples for both parent and child pipeline configurations and demonstrates the variable inheritance in the job logs.

More from the GitLab CI and Distributed Builds trail