Skip to content

Support arbitrary default branch names for cluster catalog and dependency repositories #916

@simu

Description

@simu

Context

In #915, we ensure that new cluster catalog repos are initialized with branch master. However, there's no real requirement that catalog repos must use master as the default branch. Project Syn also doesn't configure ArgoCD to explicitly check out branch master, but instead just lets ArgoCD check out the catalog repo default branch.

We should consider restoring the behavior that Commodore respects the user's init.defaultBranch when creating cluster catalog repositories.

Additionally, we should also respect the user's init.defaultBranch when creating new dependencies. However, to allow that we'll need to update the dependency template to support additional default branches for the tests (cf. projectsyn/commodore-component-template#13). Notably, the dependency sync mechanism already supports arbitrary default branches.

Task deliverables

  • Commodore respects the user's init.defaultBranch when creating new repositories (catalog or dependencies)
  • Commodore correctly identifies the local default branch for newly created repos when pushing to a remote repo which doesn't have a default branch yet.
  • Tests are updated
  • Documentation is updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions