Skip to content

Feature: add support for multiple projects in different groups for gitlab #30

Description

@slimctl

Currently we can only pass 1 group as an organization, this works great for github but not for gitlab.

In gitlab repositories/projects are under groups, which means if you have repositories across multiple groups it's not possible to add a webhook to those repositories.

Below is an example of the values.yaml with 1 project.

  piper:
    gitProvider:
      name: gitlab
      # Map of organization configurations.
      organization:
        # -- Name of your Git Organization (GitHub) / Workspace (Bitbucket) or Group (Gitlab)
        name: "private/k8s"
      # Map of webhook configurations.
      webhook:
        # -- (Github/Gitlab) Used of orgLevel=false, to configure webhook for each of the repos provided.
        repoList: ["some-repo"]

Some possible solutions below:

  1. You could have a repoList with the full path to the repo for example:
      webhook:
        # -- (Github/Gitlab) Used of orgLevel=false, to configure webhook for each of the repos provided.
        repoList: ["private/k8s/some-repo", "private/k8s/some-repo"]
  1. You could create another property called groups
  piper:
    gitProvider:
      name: gitlab
      # Map of organization configurations.
      groups: ["private/k8s", "some-other-project"]
  1. You could create specific properties based on the git provider.
  piper:
    gitProvider:
      gitlab:
       # Map of organization configurations.
       groups: ["private/k8s", "some-other-project"]
      github:
       organization: "some-organization"
      bitbucket:
       some-prop: "some-value" 

The latter would be the most flexible one.

EDIT: fixed gitlab naming of groups

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions