Variable and artifact sharing in GitLab parent-child pipelines
Oct 16, 2025William Arias

Summary
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.