apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: buildruns.build.dev
spec:
  group: build.dev
  names:
    kind: BuildRun
    listKind: BuildRunList
    plural: buildruns
    shortNames:
    - br
    - brs
    singular: buildrun
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - description: The Succeeded status of the BuildRun
      jsonPath: .status.conditions[?(@.type=="Succeeded")].status
      name: Succeeded
      type: string
    - description: The Succeeded reason of the BuildRun
      jsonPath: .status.conditions[?(@.type=="Succeeded")].reason
      name: Reason
      type: string
    - description: The start time of this BuildRun
      jsonPath: .status.startTime
      name: StartTime
      type: date
    - description: The completion time of this BuildRun
      jsonPath: .status.completionTime
      name: CompletionTime
      type: date
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: BuildRun is the Schema representing an instance of build execution
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: BuildRunSpec defines the desired state of BuildRun
            properties:
              buildRef:
                description: BuildRef refers to the Build
                properties:
                  apiVersion:
                    description: API version of the referent
                    type: string
                  name:
                    description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names'
                    type: string
                required:
                - name
                type: object
              output:
                description: Output refers to the location where the generated image
                  would be pushed to. It will overwrite the output image in build
                  spec
                properties:
                  credentials:
                    description: SecretRef is a reference to the Secret containing
                      the credentials to push the image to the registry
                    properties:
                      name:
                        description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                          TODO: Add other useful fields. apiVersion, kind, uid?'
                        type: string
                    type: object
                  image:
                    description: ImageURL is the URL where the image will be pushed
                      to.
                    type: string
                required:
                - image
                type: object
              serviceAccount:
                description: ServiceAccount refers to the kubernetes serviceaccount
                  which is used for resource control. Default serviceaccount will
                  be set if it is empty
                properties:
                  generate:
                    description: If generates a new ServiceAccount for the build
                    type: boolean
                  name:
                    description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names'
                    type: string
                type: object
              timeout:
                description: Timeout defines the maximum run time of this BuildRun.
                format: duration
                type: string
            required:
            - buildRef
            type: object
          status:
            description: BuildRunStatus defines the observed state of BuildRun
            properties:
              buildSpec:
                description: BuildSpec is the Build Spec of this BuildRun.
                properties:
                  builder:
                    description: BuilderImage refers to the image containing the build
                      tools inside which the source code would be built.
                    properties:
                      credentials:
                        description: SecretRef is a reference to the Secret containing
                          the credentials to push the image to the registry
                        properties:
                          name:
                            description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                              TODO: Add other useful fields. apiVersion, kind, uid?'
                            type: string
                        type: object
                      image:
                        description: ImageURL is the URL where the image will be pushed
                          to.
                        type: string
                    required:
                    - image
                    type: object
                  dockerfile:
                    description: Dockerfile is the path to the Dockerfile to be used
                      for build strategies which bank on the Dockerfile for building
                      an image.
                    type: string
                  output:
                    description: Output refers to the location where the generated
                      image would be pushed to.
                    properties:
                      credentials:
                        description: SecretRef is a reference to the Secret containing
                          the credentials to push the image to the registry
                        properties:
                          name:
                            description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                              TODO: Add other useful fields. apiVersion, kind, uid?'
                            type: string
                        type: object
                      image:
                        description: ImageURL is the URL where the image will be pushed
                          to.
                        type: string
                    required:
                    - image
                    type: object
                  parameters:
                    description: Parameters contains name-value that could be used
                      to loosely type parameters in the BuildStrategy.
                    items:
                      description: Parameter defines the data structure that would
                        be used for expressing arbitrary key/value pairs for the execution
                        of a build
                      properties:
                        name:
                          type: string
                        value:
                          type: string
                      required:
                      - name
                      - value
                      type: object
                    type: array
                  runtime:
                    description: Runtime represents the runtime-image
                    properties:
                      base:
                        description: Base runtime base image.
                        properties:
                          credentials:
                            description: SecretRef is a reference to the Secret containing
                              the credentials to push the image to the registry
                            properties:
                              name:
                                description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                                  TODO: Add other useful fields. apiVersion, kind,
                                  uid?'
                                type: string
                            type: object
                          image:
                            description: ImageURL is the URL where the image will
                              be pushed to.
                            type: string
                        required:
                        - image
                        type: object
                      entrypoint:
                        description: Entrypoint runtime-image entrypoint.
                        items:
                          type: string
                        type: array
                      env:
                        additionalProperties:
                          type: string
                        description: Env environment variables for runtime.
                        type: object
                      labels:
                        additionalProperties:
                          type: string
                        description: Labels map of additional labels to be applied
                          on image.
                        type: object
                      paths:
                        description: Paths list of directories/files to be copied
                          into runtime-image, using colon ":" to split up source and
                          destination paths.
                        items:
                          type: string
                        type: array
                      run:
                        description: Run arbitrary commands to run before copying
                          data into runtime-image.
                        items:
                          type: string
                        type: array
                      user:
                        description: User definitions of user and group for runtime-image.
                        properties:
                          group:
                            description: Group group name or GID employed in runtime-image.
                            type: string
                          name:
                            description: Name user name to be employed in runtime-image.
                            type: string
                        required:
                        - name
                        type: object
                      workDir:
                        description: WorkDir runtime image working directory `WORKDIR`.
                        type: string
                    type: object
                  source:
                    description: Source refers to the Git repository containing the
                      source code to be built.
                    properties:
                      contextDir:
                        description: ContextDir is a path to subfolder in the repo.
                          Optional.
                        type: string
                      credentials:
                        description: SecretRef refers to the secret that contains
                          credentials to access the git repo. Optional.
                        properties:
                          name:
                            description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                              TODO: Add other useful fields. apiVersion, kind, uid?'
                            type: string
                        type: object
                      flavor:
                        description: Flavor of the git provider like github, gitlab,
                          bitbucket, generic, etc. Optional.
                        type: string
                      httpProxy:
                        description: HTTPProxy is optional.
                        type: string
                      httpsProxy:
                        description: HTTPSProxy is optional.
                        type: string
                      noProxy:
                        description: NoProxy can be used to specify domains for which
                          no proxying should be performed. Optional.
                        type: string
                      revision:
                        description: Ref is a git reference. Optional. "master" is
                          used by default.
                        type: string
                      url:
                        description: URL of the git repo
                        type: string
                    required:
                    - url
                    type: object
                  strategy:
                    description: StrategyRef refers to the BuildStrategy to be used
                      to build the container image. There are namespaced scope and
                      cluster scope BuildStrategy
                    properties:
                      apiVersion:
                        description: API version of the referent
                        type: string
                      kind:
                        description: BuildStrategyKind indicates the kind of the buildstrategy,
                          namespaced or cluster scoped.
                        type: string
                      name:
                        description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names'
                        type: string
                    required:
                    - name
                    type: object
                  timeout:
                    description: Timeout defines the maximum run time of a build run.
                    format: duration
                    type: string
                required:
                - output
                - source
                - strategy
                type: object
              completionTime:
                description: CompletionTime is the time the build completed.
                format: date-time
                type: string
              conditions:
                description: Conditions
                items:
                  description: Condition defines the required fields for populating
                    Build controllers Conditions
                  properties:
                    lastTransitionTime:
                      description: LastTransitionTime last time the condition transit
                        from one status to another.
                      format: date-time
                      type: string
                    message:
                      description: A human readable message indicating details about
                        the transition.
                      type: string
                    reason:
                      description: The reason for the condition last transition.
                      type: string
                    status:
                      description: Status of the condition, one of True, False, Unknown.
                      type: string
                    type:
                      description: Type of condition
                      type: string
                  required:
                  - status
                  - type
                  type: object
                type: array
              failedAt:
                description: FailedAt points to the resource where the BuildRun failed
                properties:
                  container:
                    type: string
                  pod:
                    type: string
                type: object
              latestTaskRunRef:
                description: PodName is the name of the pod responsible for executing
                  this task's steps.
                type: string
              reason:
                description: The Succeeded reason of the TaskRun
                type: string
              startTime:
                description: StartTime is the time the build is actually started.
                format: date-time
                type: string
              succeeded:
                description: The Succeeded status of the TaskRun
                type: string
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
