Support array flattening when anchors/reference tags are used in dependencies keyword
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
Anchor is working with needs but not with dependencies :
Steps to reproduce
- In a gitlab-ci file, define anchor with an array value
- use anchor with needs => ok
- use anchor with dependenies => ko, reason : Incorrect type. Expected "string".yaml-schema: https://gitlab.com/assets/webpack/ci.97c097a9.json(0)_
.needs_jobs: &needs_jobs
- job-1
- job-2
.dependencies_jobs: &dependencies_jobs
- job-3
- job-4
job:
needs:
- *needs_jobs
- job-5
dependencies:
- *dependencies_jobs
- job-6
Example Project
https://gitlab.com/gitlab-ci9281314/anchor-with-needs-and-dependencies/-/blob/main/.gitlab-ci.yml?ref_type=heads

What is the current bug behavior?
dependencies don't accept anchor value
What is the expected correct behavior?
dependencies should accept anchor value since needs accept it
Results of GitLab application Check
Expand for output related to the GitLab application check
This GitLab CI configuration is invalid: jobs:job config contains unknown keys: dependencies.
Edited by 🤖 GitLab Bot 🤖