apiVersion: v1
kind: ConfigMap
metadata:
  name: publisher-rules
data:
  config: |
    skip-source-branches:
    - release-1.5
    - release-1.6
    recursive-delete-patterns:
    - BUILD
    - "*/BUILD"
    - BUILD.bazel
    - "*/BUILD.bazel"
    - Gopkg.toml
    rules:
    - destination: code-generator
      branches:
      - source:
          branch: master
          dir: staging/src/k8s.io/code-generator
        name: master
      # - source:
      #     branch: release-1.8
      #     dir: staging/src/k8s.io/code-generator
      #   name: release-1.8
      - source:
          branch: release-1.9
          dir: staging/src/k8s.io/code-generator
        name: release-1.9
        go: 1.9.7
      - source:
          branch: release-1.10
          dir: staging/src/k8s.io/code-generator
        name: release-1.10
        go: 1.9.7
      - source:
          branch: release-1.11
          dir: staging/src/k8s.io/code-generator
        name: release-1.11
    - destination: apimachinery
      library: true
      branches:
      - source:
          branch: master
          dir: staging/src/k8s.io/apimachinery
        name: master
      # - source:
      #     branch: release-1.6
      #     dir: staging/src/k8s.io/apimachinery
      #   name: release-1.6
      # - source:
      #     branch: release-1.7
      #     dir: staging/src/k8s.io/apimachinery
      #   name: release-1.7
      # - source:
      #     branch: release-1.8
      #     dir: staging/src/k8s.io/apimachinery
      #   name: release-1.8
      - source:
          branch: release-1.9
          dir: staging/src/k8s.io/apimachinery
        name: release-1.9
        go: 1.9.7
      - source:
          branch: release-1.10
          dir: staging/src/k8s.io/apimachinery
        name: release-1.10
        go: 1.9.7
      - source:
          branch: release-1.11
          dir: staging/src/k8s.io/apimachinery
        name: release-1.11
    - destination: api
      library: true
      branches:
      - source:
          branch: master
          dir: staging/src/k8s.io/api
        name: master
        dependencies:
        - repository: apimachinery
          branch: master
      # - source:
      #     branch: release-1.8
      #     dir: staging/src/k8s.io/api
      #   name: release-1.8
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.8
      - source:
          branch: release-1.9
          dir: staging/src/k8s.io/api
        name: release-1.9
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.9
      - source:
          branch: release-1.10
          dir: staging/src/k8s.io/api
        name: release-1.10
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.10
      - source:
          branch: release-1.11
          dir: staging/src/k8s.io/api
        name: release-1.11
        dependencies:
        - repository: apimachinery
          branch: release-1.11
    - destination: client-go
      library: true
      branches:
      - source:
          branch: master
          dir: staging/src/k8s.io/client-go
        name: master
        dependencies:
        - repository: apimachinery
          branch: master
        - repository: api
          branch: master
      # - source:
      #     branch: release-1.5
      #     dir: staging/src/k8s.io/client-go
      #   name: release-2.0
      # - source:
      #     branch: release-1.6
      #     dir: staging/src/k8s.io/client-go
      #   name: release-3.0
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.6
      # - source:
      #     branch: release-1.7
      #     dir: staging/src/k8s.io/client-go
      #   name: release-4.0
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.7
      # - source:
      #     branch: release-1.8
      #     dir: staging/src/k8s.io/client-go
      #   name: release-5.0
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.8
      #   - repository: api
      #     branch: release-1.8
      - source:
          branch: release-1.9
          dir: staging/src/k8s.io/client-go
        name: release-6.0
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.9
        - repository: api
          branch: release-1.9
      - source:
          branch: release-1.10
          dir: staging/src/k8s.io/client-go
        name: release-7.0
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.10
        - repository: api
          branch: release-1.10
      - source:
          branch: release-1.11
          dir: staging/src/k8s.io/client-go
        name: release-8.0
        dependencies:
        - repository: apimachinery
          branch: release-1.11
        - repository: api
          branch: release-1.11
      smoke-test: |
        godep restore
        go build ./...
        go test $(go list ./... | grep -v /vendor/)
    - destination: apiserver
      library: true
      branches:
      - source:
          branch: master
          dir: staging/src/k8s.io/apiserver
        name: master
        dependencies:
        - repository: apimachinery
          branch: master
        - repository: api
          branch: master
        - repository: client-go
          branch: master
      # - source:
      #     branch: release-1.6
      #     dir: staging/src/k8s.io/apiserver
      #   name: release-1.6
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.6
      #   - repository: client-go
      #     branch: release-3.0
      # - source:
      #     branch: release-1.7
      #     dir: staging/src/k8s.io/apiserver
      #   name: release-1.7
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.7
      #   - repository: client-go
      #     branch: release-4.0
      # - source:
      #     branch: release-1.8
      #     dir: staging/src/k8s.io/apiserver
      #   name: release-1.8
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.8
      #   - repository: api
      #     branch: release-1.8
      #   - repository: client-go
      #     branch: release-5.0
      - source:
          branch: release-1.9
          dir: staging/src/k8s.io/apiserver
        name: release-1.9
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.9
        - repository: api
          branch: release-1.9
        - repository: client-go
          branch: release-6.0
      - source:
          branch: release-1.10
          dir: staging/src/k8s.io/apiserver
        name: release-1.10
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.10
        - repository: api
          branch: release-1.10
        - repository: client-go
          branch: release-7.0
      - source:
          branch: release-1.11
          dir: staging/src/k8s.io/apiserver
        name: release-1.11
        dependencies:
        - repository: apimachinery
          branch: release-1.11
        - repository: api
          branch: release-1.11
        - repository: client-go
          branch: release-8.0
    - destination: kube-aggregator
      branches:
      - source:
          branch: master
          dir: staging/src/k8s.io/kube-aggregator
        name: master
        dependencies:
        - repository: apimachinery
          branch: master
        - repository: api
          branch: master
        - repository: client-go
          branch: master
        - repository: apiserver
          branch: master
      # - source:
      #     branch: release-1.6
      #     dir: staging/src/k8s.io/kube-aggregator
      #   name: release-1.6
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.6
      #   - repository: client-go
      #     branch: release-3.0
      #   - repository: apiserver
      #     branch: release-1.6
      # - source:
      #     branch: release-1.7
      #     dir: staging/src/k8s.io/kube-aggregator
      #   name: release-1.7
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.7
      #   - repository: client-go
      #     branch: release-4.0
      #   - repository: apiserver
      #     branch: release-1.7
      # - source:
      #     branch: release-1.8
      #     dir: staging/src/k8s.io/kube-aggregator
      #   name: release-1.8
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.8
      #   - repository: api
      #     branch: release-1.8
      #   - repository: client-go
      #     branch: release-5.0
      #   - repository: apiserver
      #     branch: release-1.8
      - source:
          branch: release-1.9
          dir: staging/src/k8s.io/kube-aggregator
        name: release-1.9
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.9
        - repository: api
          branch: release-1.9
        - repository: client-go
          branch: release-6.0
        - repository: apiserver
          branch: release-1.9
      - source:
          branch: release-1.10
          dir: staging/src/k8s.io/kube-aggregator
        name: release-1.10
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.10
        - repository: api
          branch: release-1.10
        - repository: client-go
          branch: release-7.0
        - repository: apiserver
          branch: release-1.10
      - source:
          branch: release-1.11
          dir: staging/src/k8s.io/kube-aggregator
        name: release-1.11
        dependencies:
        - repository: apimachinery
          branch: release-1.11
        - repository: api
          branch: release-1.11
        - repository: client-go
          branch: release-8.0
        - repository: apiserver
          branch: release-1.11
    - destination: sample-apiserver
      branches:
      - source:
          branch: master
          dir: staging/src/k8s.io/sample-apiserver
        name: master
        dependencies:
        - repository: apimachinery
          branch: master
        - repository: api
          branch: master
        - repository: client-go
          branch: master
        - repository: apiserver
          branch: master
        - repository: code-generator
          branch: master
        required-packages:
        - k8s.io/code-generator
      # - source:
      #     branch: release-1.6
      #     dir: staging/src/k8s.io/sample-apiserver
      #   name: release-1.6
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.6
      #   - repository: client-go
      #     branch: release-3.0
      #   - repository: apiserver
      #     branch: release-1.6
      # - source:
      #     branch: release-1.7
      #     dir: staging/src/k8s.io/sample-apiserver
      #   name: release-1.7
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.7
      #   - repository: client-go
      #     branch: release-4.0
      #   - repository: apiserver
      #     branch: release-1.7
      # - source:
      #     branch: release-1.8
      #     dir: staging/src/k8s.io/sample-apiserver
      #   name: release-1.8
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.8
      #   - repository: api
      #     branch: release-1.8
      #   - repository: client-go
      #     branch: release-5.0
      #   - repository: apiserver
      #     branch: release-1.8
      #   - repository: code-generator
      #     branch: release-1.8
      #   required-packages:
      #   - k8s.io/code-generator
      - source:
          branch: release-1.9
          dir: staging/src/k8s.io/sample-apiserver
        name: release-1.9
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.9
        - repository: api
          branch: release-1.9
        - repository: client-go
          branch: release-6.0
        - repository: apiserver
          branch: release-1.9
        - repository: code-generator
          branch: release-1.9
        required-packages:
        - k8s.io/code-generator
      - source:
          branch: release-1.10
          dir: staging/src/k8s.io/sample-apiserver
        name: release-1.10
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.10
        - repository: api
          branch: release-1.10
        - repository: client-go
          branch: release-7.0
        - repository: apiserver
          branch: release-1.10
        - repository: code-generator
          branch: release-1.10
        required-packages:
        - k8s.io/code-generator
      - source:
          branch: release-1.11
          dir: staging/src/k8s.io/sample-apiserver
        name: release-1.11
        dependencies:
        - repository: apimachinery
          branch: release-1.11
        - repository: api
          branch: release-1.11
        - repository: client-go
          branch: release-8.0
        - repository: apiserver
          branch: release-1.11
        - repository: code-generator
          branch: release-1.11
        required-packages:
        - k8s.io/code-generator
      smoke-test: |
        # vendor/ should have all dependencies as a non-library
        go build .
        # re-create vendor/ and try again
        godep restore
        rm -rf vendor/ Godeps/
        godep save ./...
        go build .
    - destination: sample-controller
      branches:
      - source:
          branch: master
          dir: staging/src/k8s.io/sample-controller
        name: master
        dependencies:
        - repository: apimachinery
          branch: master
        - repository: api
          branch: master
        - repository: client-go
          branch: master
        - repository: code-generator
          branch: master
        required-packages:
        - k8s.io/code-generator
      - source:
          branch: release-1.9
          dir: staging/src/k8s.io/sample-controller
        name: release-1.9
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.9
        - repository: api
          branch: release-1.9
        - repository: client-go
          branch: release-6.0
        - repository: code-generator
          branch: release-1.9
        required-packages:
        - k8s.io/code-generator
      - source:
          branch: release-1.10
          dir: staging/src/k8s.io/sample-controller
        name: release-1.10
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.10
        - repository: api
          branch: release-1.10
        - repository: client-go
          branch: release-7.0
        - repository: code-generator
          branch: release-1.10
        required-packages:
        - k8s.io/code-generator
      - source:
          branch: release-1.11
          dir: staging/src/k8s.io/sample-controller
        name: release-1.11
        dependencies:
        - repository: apimachinery
          branch: release-1.11
        - repository: api
          branch: release-1.11
        - repository: client-go
          branch: release-8.0
        - repository: code-generator
          branch: release-1.11
        required-packages:
        - k8s.io/code-generator
      smoke-test: |
        # vendor/ should have all dependencies as a non-library
        go build .

        # re-create vendor/ and try again
        godep restore
        rm -rf vendor/ Godeps/
        godep save ./...
        go build .
    - destination: apiextensions-apiserver
      branches:
      - source:
          branch: master
          dir: staging/src/k8s.io/apiextensions-apiserver
        name: master
        dependencies:
        - repository: apimachinery
          branch: master
        - repository: api
          branch: master
        - repository: client-go
          branch: master
        - repository: apiserver
          branch: master
        - repository: code-generator
          branch: master
        required-packages:
        - k8s.io/code-generator
      # - source:
      #     branch: release-1.7
      #     dir: staging/src/k8s.io/apiextensions-apiserver
      #   name: release-1.7
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.7
      #   - repository: client-go
      #     branch: release-4.0
      #   - repository: apiserver
      #     branch: release-1.7
      # - source:
      #     branch: release-1.8
      #     dir: staging/src/k8s.io/apiextensions-apiserver
      #   name: release-1.8
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.8
      #   - repository: api
      #     branch: release-1.8
      #   - repository: client-go
      #     branch: release-5.0
      #   - repository: apiserver
      #     branch: release-1.8
      #   - repository: code-generator
      #     branch: release-1.8
      #   required-packages:
      #   - k8s.io/code-generator
      - source:
          branch: release-1.9
          dir: staging/src/k8s.io/apiextensions-apiserver
        name: release-1.9
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.9
        - repository: api
          branch: release-1.9
        - repository: client-go
          branch: release-6.0
        - repository: apiserver
          branch: release-1.9
        - repository: code-generator
          branch: release-1.9
        required-packages:
        - k8s.io/code-generator
      - source:
          branch: release-1.10
          dir: staging/src/k8s.io/apiextensions-apiserver
        name: release-1.10
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.10
        - repository: api
          branch: release-1.10
        - repository: client-go
          branch: release-7.0
        - repository: apiserver
          branch: release-1.10
        - repository: code-generator
          branch: release-1.10
        required-packages:
        - k8s.io/code-generator
      - source:
          branch: release-1.11
          dir: staging/src/k8s.io/apiextensions-apiserver
        name: release-1.11
        dependencies:
        - repository: apimachinery
          branch: release-1.11
        - repository: api
          branch: release-1.11
        - repository: client-go
          branch: release-8.0
        - repository: apiserver
          branch: release-1.11
        - repository: code-generator
          branch: release-1.11
        required-packages:
        - k8s.io/code-generator
    - destination: metrics
      library: true
      branches:
      - source:
          branch: master
          dir: staging/src/k8s.io/metrics
        name: master
        dependencies:
        - repository: apimachinery
          branch: master
        - repository: api
          branch: master
        - repository: client-go
          branch: master
      # - source:
      #     branch: release-1.7
      #     dir: staging/src/k8s.io/metrics
      #   name: release-1.7
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.7
      #   - repository: client-go
      #     branch: release-4.0
      # - source:
      #     branch: release-1.8
      #     dir: staging/src/k8s.io/metrics
      #   name: release-1.8
      #   dependencies:
      #   - repository: apimachinery
      #     branch: release-1.8
      #   - repository: api
      #     branch: release-1.8
      #   - repository: client-go
      #     branch: release-5.0
      - source:
          branch: release-1.9
          dir: staging/src/k8s.io/metrics
        name: release-1.9
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.9
        - repository: api
          branch: release-1.9
        - repository: client-go
          branch: release-6.0
      - source:
          branch: release-1.10
          dir: staging/src/k8s.io/metrics
        name: release-1.10
        go: 1.9.7
        dependencies:
        - repository: apimachinery
          branch: release-1.10
        - repository: api
          branch: release-1.10
        - repository: client-go
          branch: release-7.0
      - source:
          branch: release-1.11
          dir: staging/src/k8s.io/metrics
        name: release-1.11
        dependencies:
        - repository: apimachinery
          branch: release-1.11
        - repository: api
          branch: release-1.11
        - repository: client-go
          branch: release-8.0
