Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,761
    • Issues 44,761
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,329
    • Merge requests 1,329
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #35345
Closed
Open
Issue created Oct 31, 2019 by Wei-Meng Lee@weimeng📖Maintainer

Backend: Includes not recursively expanded for required pipeline configuration

Summary

When using nested includes in a required pipeline configuration template, the nested includes are not expanded.

This was reported (Zendesk, internal use only) by a 90-seat premium customer.

Steps to reproduce

  1. Create a project templates/templates with the following in gitlab-ci/required_pipeline.yml:
include:
  - project: "templates/nested-include"
    ref: master
    file: "include.yml"
  1. Create a project templates/nested-include with the following in include.yml:
setup_job:
  stage: test
  script:
    - echo "Running $CI_JOB"
  1. Set templates/templates as the instance-wide template repository, and set required_pipeline as the required pipeline configuration file.

  2. Create a new project with .gitlab-ci.yml file. Observe that CI lint fails with "This GitLab Ci configuration is invalid: include config contains unknown keys: project, ref"

Example Project

N/A

What is the current bug behavior?

The validation error occurs because the nested include is not expanded.

What is the expected correct behavior?

The nested include should be expanded.

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)

Output of checks

This bug happens on v12.4.0-ee.

Possible fixes

The problem occurs here: https://gitlab.com/gitlab-org/gitlab/blob/master/ee/lib/ee/gitlab/ci/config_ee.rb#L18

It does not process includes. More details: #35345 (comment 441520840)

User Impact

The CI linter fails due to the inability for includes to be expanded and therefore making variables inaccessible. The result is errors noting that the configuration is invalid due to unknown keys. The keys are there but not available to be read.

Edited Aug 26, 2022 by Mark Nuzzo
Assignee
Assign to
Time tracking