{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Promotion represents a request to transition a particular Stage into a\nparticular Freight.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "Spec describes the desired transition of a specific Stage into a specific\nFreight.",
      "properties": {
        "freight": {
          "description": "Freight specifies the piece of Freight to be promoted into the Stage\nreferenced by the Stage field.",
          "minLength": 1,
          "type": "string"
        },
        "stage": {
          "description": "Stage specifies the name of the Stage to which this Promotion\napplies. The Stage referenced by this field MUST be in the same\nnamespace as the Promotion.",
          "minLength": 1,
          "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
          "type": "string"
        },
        "steps": {
          "description": "Steps specifies the directives to be executed as part of this Promotion.\nThe order in which the directives are executed is the order in which they\nare listed in this field.",
          "items": {
            "description": "PromotionStep describes a directive to be executed as part of a Promotion.",
            "properties": {
              "as": {
                "description": "As is the alias this step can be referred to as.",
                "type": "string"
              },
              "config": {
                "description": "Config is opaque configuration for the PromotionStep that is understood\nonly by each PromotionStep's implementation. It is legal to utilize\nexpressions in defining values at any level of this block.\nSee https://docs.kargo.io/references/expression-language for details.",
                "x-kubernetes-preserve-unknown-fields": true
              },
              "retry": {
                "description": "Retry is the retry policy for this step.",
                "properties": {
                  "attempts": {
                    "description": "Attempts is the number of times the step can be attempted before the\nPromotionStep is marked as failed.\n\nIf this field is set to 1, the step will not be retried. If this\nfield is set to -1, the step will be retried indefinitely.\n\nThe default of this field depends on the step being executed. Refer to\nthe documentation for the specific step for more information.",
                    "format": "int64",
                    "maximum": 9223372036854776000,
                    "minimum": -9223372036854776000,
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "uses": {
                "description": "Uses identifies a runner that can execute this step.",
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "uses"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "vars": {
          "description": "Vars is a list of variables that can be referenced by expressions in\npromotion steps.",
          "items": {
            "description": "PromotionVariable describes a single variable that may be referenced by\nexpressions in promotion steps.",
            "properties": {
              "name": {
                "description": "Name is the name of the variable.",
                "minLength": 1,
                "pattern": "^[a-zA-Z_]\\w*$",
                "type": "string"
              },
              "value": {
                "description": "Value is the value of the variable. It is allowed to utilize expressions\nin the value.\nSee https://docs.kargo.io/references/expression-language for details.",
                "type": "string"
              }
            },
            "required": [
              "name",
              "value"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "freight",
        "stage"
      ],
      "type": "object"
    },
    "status": {
      "description": "Status describes the current state of the transition represented by this\nPromotion.",
      "properties": {
        "currentStep": {
          "description": "CurrentStep is the index of the current promotion step being executed. This\npermits steps that have already run successfully to be skipped on\nsubsequent reconciliations attempts.",
          "format": "int64",
          "maximum": 9223372036854776000,
          "minimum": -9223372036854776000,
          "type": "integer"
        },
        "currentStepAttempt": {
          "description": "CurrentStepAttempt is the number of times the current step has been\nattempted.",
          "format": "int64",
          "maximum": 9223372036854776000,
          "minimum": -9223372036854776000,
          "type": "integer"
        },
        "finishedAt": {
          "description": "FinishedAt is the time when the promotion was completed.",
          "format": "date-time",
          "type": "string"
        },
        "freight": {
          "description": "Freight is the detail of the piece of freight that was referenced by this promotion.",
          "properties": {
            "charts": {
              "description": "Charts describes specific versions of specific Helm charts.",
              "items": {
                "description": "Chart describes a specific version of a Helm chart.",
                "properties": {
                  "name": {
                    "description": "Name specifies the name of the chart.",
                    "type": "string"
                  },
                  "repoURL": {
                    "description": "RepoURL specifies the URL of a Helm chart repository. Classic chart\nrepositories (using HTTP/S) can contain differently named charts. When this\nfield points to such a repository, the Name field will specify the name of\nthe chart within the repository. In the case of a repository within an OCI\nregistry, the URL implicitly points to a specific chart and the Name field\nwill be empty.",
                    "type": "string"
                  },
                  "version": {
                    "description": "Version specifies a particular version of the chart.",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "commits": {
              "description": "Commits describes specific Git repository commits.",
              "items": {
                "description": "GitCommit describes a specific commit from a specific Git repository.",
                "properties": {
                  "author": {
                    "description": "Author is the author of the commit.",
                    "type": "string"
                  },
                  "branch": {
                    "description": "Branch denotes the branch of the repository where this commit was found.",
                    "type": "string"
                  },
                  "committer": {
                    "description": "Committer is the person who committed the commit.",
                    "type": "string"
                  },
                  "id": {
                    "description": "ID is the ID of a specific commit in the Git repository specified by\nRepoURL.",
                    "type": "string"
                  },
                  "message": {
                    "description": "Message is the message associated with the commit. At present, this only\ncontains the first line (subject) of the commit message.",
                    "type": "string"
                  },
                  "repoURL": {
                    "description": "RepoURL is the URL of a Git repository.",
                    "type": "string"
                  },
                  "tag": {
                    "description": "Tag denotes a tag in the repository that matched selection criteria and\nresolved to this commit.",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "images": {
              "description": "Images describes specific versions of specific container images.",
              "items": {
                "description": "Image describes a specific version of a container image.",
                "properties": {
                  "digest": {
                    "description": "Digest identifies a specific version of the image in the repository\nspecified by RepoURL. This is a more precise identifier than Tag.",
                    "type": "string"
                  },
                  "gitRepoURL": {
                    "description": "GitRepoURL specifies the URL of a Git repository that contains the source\ncode for the image repository referenced by the RepoURL field if Kargo was\nable to infer it.",
                    "type": "string"
                  },
                  "repoURL": {
                    "description": "RepoURL describes the repository in which the image can be found.",
                    "type": "string"
                  },
                  "tag": {
                    "description": "Tag identifies a specific version of the image in the repository specified\nby RepoURL.",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "name": {
              "description": "Name is system-assigned identifier that is derived deterministically from\nthe contents of the Freight. i.e. Two pieces of Freight can be compared for\nequality by comparing their Names.",
              "type": "string"
            },
            "origin": {
              "description": "Origin describes a kind of Freight in terms of its origin.",
              "properties": {
                "kind": {
                  "description": "Kind is the kind of resource from which Freight may have originated. At\npresent, this can only be \"Warehouse\".",
                  "enum": [
                    "Warehouse"
                  ],
                  "type": "string"
                },
                "name": {
                  "description": "Name is the name of the resource of the kind indicated by the Kind field\nfrom which Freight may originated.",
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "name"
              ],
              "type": "object"
            }
          },
          "type": "object"
        },
        "freightCollection": {
          "description": "FreightCollection contains the details of the piece of Freight referenced\nby this Promotion as well as any additional Freight that is carried over\nfrom the target Stage's current state.",
          "properties": {
            "id": {
              "description": "ID is a unique and deterministically calculated identifier for the\nFreightCollection. It is updated on each use of the UpdateOrPush method.",
              "type": "string"
            },
            "items": {
              "additionalProperties": {
                "description": "FreightReference is a simplified representation of a piece of Freight -- not\na root resource type.",
                "properties": {
                  "charts": {
                    "description": "Charts describes specific versions of specific Helm charts.",
                    "items": {
                      "description": "Chart describes a specific version of a Helm chart.",
                      "properties": {
                        "name": {
                          "description": "Name specifies the name of the chart.",
                          "type": "string"
                        },
                        "repoURL": {
                          "description": "RepoURL specifies the URL of a Helm chart repository. Classic chart\nrepositories (using HTTP/S) can contain differently named charts. When this\nfield points to such a repository, the Name field will specify the name of\nthe chart within the repository. In the case of a repository within an OCI\nregistry, the URL implicitly points to a specific chart and the Name field\nwill be empty.",
                          "type": "string"
                        },
                        "version": {
                          "description": "Version specifies a particular version of the chart.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "commits": {
                    "description": "Commits describes specific Git repository commits.",
                    "items": {
                      "description": "GitCommit describes a specific commit from a specific Git repository.",
                      "properties": {
                        "author": {
                          "description": "Author is the author of the commit.",
                          "type": "string"
                        },
                        "branch": {
                          "description": "Branch denotes the branch of the repository where this commit was found.",
                          "type": "string"
                        },
                        "committer": {
                          "description": "Committer is the person who committed the commit.",
                          "type": "string"
                        },
                        "id": {
                          "description": "ID is the ID of a specific commit in the Git repository specified by\nRepoURL.",
                          "type": "string"
                        },
                        "message": {
                          "description": "Message is the message associated with the commit. At present, this only\ncontains the first line (subject) of the commit message.",
                          "type": "string"
                        },
                        "repoURL": {
                          "description": "RepoURL is the URL of a Git repository.",
                          "type": "string"
                        },
                        "tag": {
                          "description": "Tag denotes a tag in the repository that matched selection criteria and\nresolved to this commit.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "images": {
                    "description": "Images describes specific versions of specific container images.",
                    "items": {
                      "description": "Image describes a specific version of a container image.",
                      "properties": {
                        "digest": {
                          "description": "Digest identifies a specific version of the image in the repository\nspecified by RepoURL. This is a more precise identifier than Tag.",
                          "type": "string"
                        },
                        "gitRepoURL": {
                          "description": "GitRepoURL specifies the URL of a Git repository that contains the source\ncode for the image repository referenced by the RepoURL field if Kargo was\nable to infer it.",
                          "type": "string"
                        },
                        "repoURL": {
                          "description": "RepoURL describes the repository in which the image can be found.",
                          "type": "string"
                        },
                        "tag": {
                          "description": "Tag identifies a specific version of the image in the repository specified\nby RepoURL.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "name": {
                    "description": "Name is system-assigned identifier that is derived deterministically from\nthe contents of the Freight. i.e. Two pieces of Freight can be compared for\nequality by comparing their Names.",
                    "type": "string"
                  },
                  "origin": {
                    "description": "Origin describes a kind of Freight in terms of its origin.",
                    "properties": {
                      "kind": {
                        "description": "Kind is the kind of resource from which Freight may have originated. At\npresent, this can only be \"Warehouse\".",
                        "enum": [
                          "Warehouse"
                        ],
                        "type": "string"
                      },
                      "name": {
                        "description": "Name is the name of the resource of the kind indicated by the Kind field\nfrom which Freight may originated.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "type": "object"
              },
              "description": "Freight is a map of FreightReference objects, indexed by their Warehouse\norigin.",
              "type": "object"
            },
            "verificationHistory": {
              "description": "VerificationHistory is a stack of recent VerificationInfo. By default,\nthe last ten VerificationInfo are stored.",
              "items": {
                "description": "VerificationInfo contains the details of an instance of a Verification\nprocess.",
                "properties": {
                  "actor": {
                    "description": "Actor is the name of the entity that initiated or aborted the\nVerification process.",
                    "type": "string"
                  },
                  "analysisRun": {
                    "description": "AnalysisRun is a reference to the Argo Rollouts AnalysisRun that implements\nthe Verification process.",
                    "properties": {
                      "name": {
                        "description": "Name is the name of the AnalysisRun.",
                        "type": "string"
                      },
                      "namespace": {
                        "description": "Namespace is the namespace of the AnalysisRun.",
                        "type": "string"
                      },
                      "phase": {
                        "description": "Phase is the last observed phase of the AnalysisRun referenced by Name.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name",
                      "namespace",
                      "phase"
                    ],
                    "type": "object"
                  },
                  "finishTime": {
                    "description": "FinishTime is the time at which the Verification process finished.",
                    "format": "date-time",
                    "type": "string"
                  },
                  "id": {
                    "description": "ID is the identifier of the Verification process.",
                    "type": "string"
                  },
                  "message": {
                    "description": "Message may contain additional information about why the verification\nprocess is in its current phase.",
                    "type": "string"
                  },
                  "phase": {
                    "description": "Phase describes the current phase of the Verification process. Generally,\nthis will be a reflection of the underlying AnalysisRun's phase, however,\nthere are exceptions to this, such as in the case where an AnalysisRun\ncannot be launched successfully.",
                    "type": "string"
                  },
                  "startTime": {
                    "description": "StartTime is the time at which the Verification process was started.",
                    "format": "date-time",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "required": [
            "id"
          ],
          "type": "object"
        },
        "healthChecks": {
          "description": "HealthChecks contains the health check directives to be executed after\nthe Promotion has completed.",
          "items": {
            "description": "HealthCheckStep describes a health check directive which can be executed by\na Stage to verify the health of a Promotion result.",
            "properties": {
              "config": {
                "description": "Config is the configuration for the directive.",
                "x-kubernetes-preserve-unknown-fields": true
              },
              "uses": {
                "description": "Uses identifies a runner that can execute this step.",
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "uses"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "lastHandledRefresh": {
          "description": "LastHandledRefresh holds the value of the most recent AnnotationKeyRefresh\nannotation that was handled by the controller. This field can be used to\ndetermine whether the request to refresh the resource has been handled.",
          "type": "string"
        },
        "message": {
          "description": "Message is a display message about the promotion, including any errors\npreventing the Promotion controller from executing this Promotion.\ni.e. If the Phase field has a value of Failed, this field can be expected\nto explain why.",
          "type": "string"
        },
        "phase": {
          "description": "Phase describes where the Promotion currently is in its lifecycle.",
          "type": "string"
        },
        "state": {
          "description": "State stores the state of the promotion process between reconciliation\nattempts.",
          "x-kubernetes-preserve-unknown-fields": true
        }
      },
      "type": "object"
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}