Skip to content

adds support for per-branch variables: VARNAME@branch

This is a general Merge Request template. Consider to choose a template from the list above if it will match your case more.

What does this MR do?

Filters out per-branch variables (those containing @branch suffix not matching current branch. Variables matching current branch will be exposed without the branch suffix.

Why was this MR needed?

Together with gitlab-ce patch this allows definition of per-branch secret variables. For example having

    VAULT_PASS@master=abc
    VAULT_PASS@production=def

will expose VAULT_PASS=def when running on production branch.

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/13379

Merge request reports