Skip to content

Implement including multiple files from a project

Furkan Ayhan requested to merge 26793-implementing-include-multiple-file into master

What does this MR do?

Related to #26793 (closed)

E2E test case issue gitlab-org/quality/testcases#1082 (closed)

This allows us to include multiple files from a project.

It is behind a feature flag ci_include_multiple_files_from_project (#271560 (closed))

Note: I did not any validation to Entry::Include because we have a problem with the validation of it. I suggest adding the validations after fixing it.

TODO: We currently limit the total number of included files to 100. This MR does not count each file for now. Duplicate file verification is also not implemented yet. We cannot roll-out this feature without them, but we can either merge this and create another MR. Or we can wait for the next MR before merging this.

Screenshots (strongly suggested)

Right now, we can already do this:

.gitlab-ci.yml

include:
  - project: my/other_project
    file: file1.yml
  - project: my/other_project
    file: file2.yml

This MR allows us to do this:

.gitlab-ci.yml

include:
  - project: my/other_project
    file:
      - file1.yml
      - file2.yml

file1.yml of my/other_project

build:
  stage: build
  script: echo build

file2.yml of my/other_project

test:
  stage: test
  script: echo test

OUTPUT:

Screen_Shot_2020-10-23_at_13.10.41

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Tiffany Rea

Merge request reports