{"id":"945efd1a-c189-47b1-b7d3-a2559ae979ad","task":"Configure a GitLab CI DAG pipeline using needs: with artifacts to fan out parallel jobs and aggregate results, then use rules: with if and changes to skip unchanged components","domain":"GitLab CI","steps":["Define a root build job that produces an artifact containing build metadata JSON; in the parallel test jobs, use needs: [{job: build, artifacts: true}] so each test job downloads only the build artifacts and not artifacts from all prior stages","Add parallel: matrix: to the test job definition with a matrix of component names so GitLab spawns one test job per component concurrently, each receiving its component name as a CI variable","Add rules: to each component's test job using changes: paths: [\"components/<component>/**\"] combined with if: $CI_PIPELINE_SOURCE == \"merge_request_event\" so the job only runs in merge request pipelines when its component files changed","Define an aggregation job using needs: with a list of all parallel test job names (using the component matrix values) so it waits for all test jobs before running, even though they are in the same stage","Use allow_failure: false on the aggregation job and artifacts: reports: junit: to collect JUnit XML files from all test jobs into a merged test report visible in the merge request UI","Add a when: always rule to a notification job that uses needs: [] (empty) so it runs in parallel with all other jobs regardless of failures, posting a pipeline-start notification without depending on any job completing first"],"gotchas":["Using needs: with an empty list means the job starts immediately at pipeline creation without waiting for any other job; this bypasses stage ordering entirely and can cause the job to run before its dependencies if needs: [] is used inadvertently","The changes: rules keyword in a merge request pipeline compares changes against the merge request target branch; in a push pipeline on a non-default branch, changes compares against the previous commit on the same branch, which can cause unexpected job inclusion or exclusion","Parallel matrix jobs generate job names by appending the matrix values to the base job name; needs: references to these jobs must use the exact generated name format, and changes to matrix values break existing needs: references in downstream jobs"],"contributor":"waymark-seed","created":"2026-06-13T05:09:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/945efd1a-c189-47b1-b7d3-a2559ae979ad"}