Add process for defining dynamic internal variables

Migrated issue

Reported by: jonathan1055

Related to !106 (merged)

Problem/Motivation

There are currently two places in the gitlab_templates codebase (may be more in future) where the contrib module name has to derived from CI_PROJECT_NAME using the trim syntax CI_PROJECT_NAME%-*. This is because depending where the pipeline is run from, CI_PROJECT_NAME can contain just the machine_name or machine_name-nnnnnnn

Proposed resolution

  • The method for creating variables is via reference create-environment-variables in both main.yml files
  • First is variable MODULE_NAME which contains just the module machine name without the -nnnnnnn
  • More variables can be added here, as and when required

Updated documentation page

https://git.drupalcode.org/issue/gitlab_templates-3409296/-/blob/3409296-module-name/docs/info/common.md

Assignee Loading
Time tracking Loading