Skip to content
Snippets Groups Projects

Expand instance-level templates to cover .gitlab-ci.yml, .gitignore and Dockerfile

Merged Nick Thomas requested to merge (removed):5306-more-custom-templates into master
1 unresolved thread

What does this MR do?

In %11.3, we introduced a custom instance-level templates repository for license templates: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6631

This MR expands support for custom instance-level templates to three other types of file.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #5306 (closed)

Edited by Nick Thomas

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Nick Thomas resolved all discussions

    resolved all discussions

  • Nick Thomas added 1 commit

    added 1 commit

    • e34029c1 - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files

    Compare with previous version

  • Nick Thomas added 1 commit

    added 1 commit

    • 349e9994 - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files

    Compare with previous version

  • Nick Thomas added 1 commit

    added 1 commit

    • 349e9994 - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files

    Compare with previous version

  • Nick Thomas added 1 commit

    added 1 commit

    • 80352d74 - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files

    Compare with previous version

  • Nick Thomas added 1 commit

    added 1 commit

    • 942c3d97 - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files

    Compare with previous version

  • Nick Thomas added 1 commit

    added 1 commit

    • 208026c6 - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files

    Compare with previous version

  • Nick Thomas added 282 commits

    added 282 commits

    • 208026c6...2554a798 - 279 commits from branch gitlab-org:master
    • fd9558b0 - Rename Gitlab::Template::LicenseTemplate to CustomLicenseTemplate
    • 1cb0724f - Convert global templates to vendored templates via a ::TemplateFinder
    • a002b246 - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files

    Compare with previous version

  • Nick Thomas added 4 commits

    added 4 commits

    • 614e68aa - Allow repositories to be programmatically built in the specs
    • da3091d8 - Rename Gitlab::Template::LicenseTemplate to CustomLicenseTemplate
    • 8dc82cf3 - Convert global templates to vendored templates via a ::TemplateFinder
    • 1a93542a - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files

    Compare with previous version

  • Nick Thomas
  • Nick Thomas added 2 commits

    added 2 commits

    • 538c7b95 - Convert global templates to vendored templates via a ::TemplateFinder
    • c250879f - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files

    Compare with previous version

  • Nick Thomas added 1 commit

    added 1 commit

    • 57e0a82a - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files

    Compare with previous version

  • Nick Thomas added 1 commit

    added 1 commit

    • 9db85075 - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files

    Compare with previous version

  • Nick Thomas added 1 commit

    added 1 commit

    • 518bb4f0 - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files

    Compare with previous version

  • Nick Thomas
  • Nick Thomas added 2 commits

    added 2 commits

    • 6c8d89e9 - Convert global templates to vendored templates via a ::TemplateFinder
    • 33c8e042 - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files

    Compare with previous version

  • Nick Thomas changed the description

    changed the description

  • Nick Thomas marked the checklist item Changelog entry added, if necessary as completed

    marked the checklist item Changelog entry added, if necessary as completed

  • Nick Thomas marked the checklist item Documentation created/updated as completed

    marked the checklist item Documentation created/updated as completed

  • Nick Thomas marked the checklist item Tests added for this feature/bug as completed

    marked the checklist item Tests added for this feature/bug as completed

  • Nick Thomas added 1 commit

    added 1 commit

    • eb9870c0 - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files

    Compare with previous version

  • Nick Thomas marked the checklist item Conforms to the code review guidelines as completed

    marked the checklist item Conforms to the code review guidelines as completed

  • Nick Thomas marked the checklist item Conforms to the merge request performance guidelines as completed

    marked the checklist item Conforms to the merge request performance guidelines as completed

  • Nick Thomas marked the checklist item Conforms to the style guides as completed

    marked the checklist item Conforms to the style guides as completed

  • Nick Thomas marked the checklist item EE specific content should be in the top level /ee folder as completed

    marked the checklist item EE specific content should be in the top level /ee folder as completed

  • Nick Thomas marked the checklist item For a paid feature, have we considered GitLab.com plans, how it works for groups, and is there a design for promoting it to users who aren't on the correct plan? as completed

    marked the checklist item For a paid feature, have we considered GitLab.com plans, how it works for groups, and is there a design for promoting it to users who aren't on the correct plan? as completed

  • Nick Thomas added 1 commit

    added 1 commit

    • ddafa221 - Move the custom license templates to appear first in the list, for consistency

    Compare with previous version

  • Author Contributor

    @rspeicher do you mind reviewing, since you took !6631 (merged)? This one is closely related.

    I need to do a CE port, which should be a clean cherry-pick of 614e68aa and 6c8d89e9

  • assigned to @rspeicher

  • Nick Thomas added 5 commits

    added 5 commits

    • 1bdb782b - Allow repositories to be programmatically built in the specs
    • 1c2bfa7e - Rename Gitlab::Template::LicenseTemplate to CustomLicenseTemplate
    • a36b8d66 - Convert global templates to vendored templates via a ::TemplateFinder
    • b193ad69 - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files
    • b1009760 - Move the custom license templates to appear first in the list, for consistency

    Compare with previous version

  • Robert Speicher
  • @nick.thomas Looking good, just a few notes. :thumbsup: :green_heart:

  • Nick Thomas added 6 commits

    added 6 commits

    • 2054722b - Allow the TemplateFinder to handle licenses as well
    • 7b988140 - Rename BlobsHelper#dropdown_names
    • ad0df70a - fixup! Move the custom license templates to appear first in the list, for consistency
    • eb0de554 - fixup! Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files
    • bafc217b - fixup! Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files
    • 8d555b29 - fixup! Allow repositories to be programmatically built in the specs

    Compare with previous version

  • Nick Thomas marked as a Work In Progress from nick.thomas/gitlab-ee@ad0df70a322396749830d11810dc6cc49bded0d9

    marked as a Work In Progress from nick.thomas/gitlab-ee@ad0df70a322396749830d11810dc6cc49bded0d9

  • Nick Thomas added 257 commits

    added 257 commits

    • 8d555b29...5ad9d757 - 250 commits from branch gitlab-org:master
    • bffcac9c - Allow repositories to be programmatically built in the specs
    • 1aeec043 - Rename Gitlab::Template::LicenseTemplate to CustomLicenseTemplate
    • ef5cdecc - Convert global templates to vendored templates via a ::TemplateFinder
    • 5ae49d61 - Introduce custom templates for Dockerfile, .gitignore, and .gitlab-ci.yml files
    • 8ed3e5b5 - Move the custom license templates to appear first in the list, for consistency
    • 0e36e9e7 - Allow the TemplateFinder to handle licenses as well
    • 4110a8c1 - Rename BlobsHelper#dropdown_names

    Compare with previous version

  • Nick Thomas added 4 commits

    added 4 commits

    • 15b08b24 - Introduce custom instance-level templates for Dockerfile, .gitignore, and .gitlab-ci.yml files
    • 341423db - Move the custom license templates to appear first in the list, for consistency
    • c67f0d02 - Allow the TemplateFinder to handle licenses as well
    • 13207153 - Rename BlobsHelper#dropdown_names

    Compare with previous version

  • Nick Thomas unmarked as a Work In Progress

    unmarked as a Work In Progress

  • assigned to @rspeicher

  • Author Contributor

    Thanks @rspeicher, comments so far addressed and CE port created in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21530/diffs - just let me know if you want any further changes!

  • Robert Speicher resolved all discussions

    resolved all discussions

  • @nick.thomas LGTM, just one last minor failure. :thumbsup:

  • Nick Thomas added 4 commits

    added 4 commits

    • 8cb5fe5f - Introduce custom instance-level templates for Dockerfile, .gitignore, and .gitlab-ci.yml files
    • 4e84e8ab - Move the custom license templates to appear first in the list, for consistency
    • 2840992b - Allow the TemplateFinder to handle licenses as well
    • 6a00f116 - Rename BlobsHelper#dropdown_names

    Compare with previous version

  • Author Contributor

    @rspeicher sob fixed. Back to you!

  • assigned to @rspeicher

  • Robert Speicher resolved all discussions

    resolved all discussions

  • Robert Speicher approved this merge request

    approved this merge request

  • 1 class TemplateFinder
    2 prepend ::EE::TemplateFinder
    3
    4 VENDORED_TEMPLATES = {
    5 dockerfiles: ::Gitlab::Template::DockerfileTemplate,
    6 gitignores: ::Gitlab::Template::GitignoreTemplate,
    7 gitlab_ci_ymls: ::Gitlab::Template::GitlabCiYmlTemplate
    8 }.freeze
    9
    10 class << self
    11 def build(type, params = {})
    12 if type == :licenses
    13 LicenseTemplateFinder.new(params)
  • Robert Speicher resolved all discussions

    resolved all discussions

  • Robert Speicher mentioned in commit 0b6b3bf6

    mentioned in commit 0b6b3bf6

  • @nick.thomas LGTM, thanks! :thumbsup: :green_heart:

  • mentioned in commit 4c0e62f8

  • mentioned in commit 1bb431cd

  • Achilleas Pipinellis mentioned in merge request !7459 (merged)

    mentioned in merge request !7459 (merged)

  • mentioned in commit 5e7abc46

  • mentioned in issue #8429 (closed)

  • Please register or sign in to reply
    Loading