Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab FOSS GitLab FOSS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLab FOSSGitLab FOSS
  • Issues
  • #56836
Closed
Open
Issue created Mar 29, 2018 by Steven Leath@sleath

Recursive includes in .gitlab-ci.yml

I wonder if anyone else is running into this problem and how they have resolved the issue. I'm currently using the include statement in my .gitlab-ci.yml. Everything works as expected granted that I include a second yaml file into the main .gitlab-ci.yml with one include. However once I look to add a include to the second yml as well I'm unable to detect any jobs on the second yml file and I question whether this is working at all.

Currently I have a need for the level of abstraction which would be helpful to include a serious of yaml files "russian doll style" which prevent me to constantly updated multiple gitlab-ci.yml in multiple repos.

Description

The ultimate goal of this would be to have my main gitlab-ci.yml have the following

*** Last something.yml file ***

stages:

  • Build

Build stage: Build script:

  • Hello`

*** Intermediate build.yml file***

stages:

  • Build

include:

  • 'http....../something.yml' `

*** Main gitlab-ci.yml file ***

stages:

  • PreBuild
  • Build
  • PostBuild

include:

  • 'http....../build.yml' `
Edited Jan 25, 2019 by Jason Yavorska
Assignee
Assign to
Time tracking