Skip to content

Add GitLab-specific template functions

Hossein Pursultani requested to merge add-gl-template-functions into main

This MR is forked out of !32 (merged) and helps development of !31 (merged) as well as incoming MR for #5 (closed).

What does this MR do?

The template engine is changed to allow registering custom functions easily and passing them to the downstream template inventories.

Two basic GitLab-specific functions are introduced:

  1. glCommonLabels: Generates a list of Kubernetes common labels for GitLab-managed resources.
  2. glImage: Combines image sources and calculates the full image reference for various GitLab components given the version and edition of GitLab.

Usage

For usage see !32 (merged):

Author's Checklist

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Ensure a release milestone is set.
  • MR title and description are up to date, accurate, and descriptive.
  • MR targeting the appropriate branch.
  • MR has a green pipeline on GitLab.com.
  • When ready for review, MR is labeled workflowready for review per the MR workflow.

Expected

  • Test plan indicating conditions for success has been posted and passes.
  • Documentation is created or updated.
  • Tests are added.

Related issues

Edited by Clemens Beck

Merge request reports