build icon indicating copy to clipboard operation
build copied to clipboard

Allow each git source to specify multiple revisions to merge into the branch

Open fejta opened this issue 7 years ago • 0 comments

This is related to https://github.com/knative/build/issues/392

The kubernetes community needs to be able to both: a) specify multiple git sources b) specify multiple revisions to merge into each source

For example:

apiVersion: build.knative.dev/v1alpha1
kind: Build
spec:
  source:
    - git:
        url: https://github.com/bazelbuild/rules_docker
        revisions:  # Merge PRs 100-104 into master
        - master
        - pull/100/head
        - pull/101/head
        - pull/102/head
        - pull/103/head
        - pull/104/head
    - git:
        url: https://github.com/bazelbuild/rules_docker
        revisions: master

We need this because the approved PR velocity in our primary kubernetes/kubernetes repo exceeds our ability to serially test these PRs for merge. Therefore our merge automation (tide) batches together multiple approved PRs into one commit, tests this commit and merges them all at once if tests pass.

Currently this is not possible to express with the source field.

We could work around it by making jobs inject an initial step which will git fetch and git merge each PR (how we do this today: https://github.com/kubernetes/test-infra/blob/fe0a9926c1c3d0a9d94e0d3c2f755dbdbc34d892/prow/pod-utils/clone/clone.go#L121)

But ideally this is something we can express in the Build CRD

fejta avatar Oct 18 '18 00:10 fejta