Skip to content
This repository was archived by the owner on Jul 15, 2024. It is now read-only.
This repository was archived by the owner on Jul 15, 2024. It is now read-only.

SCM Provider with Pull Requests #466

@fardin01

Description

@fardin01

Problem

Both the SCM Provider generator and Pull Request generator are very good tools for different and valid use cases, but the limitation is that they cannot be used together in a Matrix generator:

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: myapp
spec:
  generators:
    - matrix:
        generators:
        - scmProvider:
            github:
              organization: myorg
        - pullRequest:
            github:
              owner: myorg
              repo: < Cannot do this here! >
  template:
   ....

We are trying to adopt/migrate to ArgoCD and this is sort of a major blocker. Our testing ecosystem depends on engineers being able to deploy PRs to validate features. According to Pull Request generator docs, "this [the genrator] fits well with the style of building a test environment when you create a pull request". However, when using ApplicationSets, we cannot really have one ApplicationSet with SCM generator and one with Pull Request generator.

Proposed solution

Add an extra attribute to SCM generator:

  generators:
  - scmProvider:
      github:
        organization: myorg
        allBranches: false
        allPullRequests: true

Similar to allBranches, allPullRequests would create a new ArgoCD app for the open PRs, and could also have a PRMatch filter.

So it would be like embedding the Pull Request generator into the SCM generator.

Any feedback/comments would be appreciated.

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