Skip to content
GitLab Next
  • Menu
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 43,823
    • Issues 43,823
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,413
    • Merge requests 1,413
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & 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

We will soon be undergoing scheduled maintenance to our database layer. We expect GitLab.com to be unavailable for up to 2 hours starting from 2022-07-02 06:00 UTC. Please note that any CI jobs that start before the maintenance window but complete during the window period will fail and may need to be started again.

  • GitLab.org
  • GitLabGitLab
  • Issues
  • #35345
Closed
Open
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)

Edited Mar 29, 2022 by Mark Nuzzo
Assignee
Assign to
Time tracking