Documentation
¶
Index ¶
- Variables
- type Blueprint
- type Deployment
- type DeploymentModules
- type Global
- type GlobalCI
- type GlobalDeployment
- type GlobalDeploymentRepo
- type GlobalRepo
- type Module
- type Project
- type ProjectCI
- type ProviderAWS
- type ProviderAWSECR
- type ProviderCue
- type ProviderDocker
- type ProviderEarthly
- type ProviderGit
- type ProviderGithub
- type Providers
- type Release
- type SchemaFile
- type Secret
- type TagStrategy
- type Target
- type TimoniProvider
Constants ¶
This section is empty.
Variables ¶
var RawSchemaFile []byte
Functions ¶
This section is empty.
Types ¶
type Blueprint ¶
type Blueprint struct { // Version defines the version of the blueprint schema being used. Version string `json:"version"` // Global contains the global configuration for the blueprint. // +optional Global Global `json:"global"` // Project contains the configuration for the project. // +optional Project Project `json:"project"` }
Blueprint contains the schema for blueprint files.
type Deployment ¶
type Deployment struct { // Environment contains the environment to deploy the module to. Environment string `json:"environment"` // On contains the events that trigger the deployment. On map[string]any `json:"on"` // Modules contains the configuration for the deployment modules for the project. // +optional Modules *DeploymentModules `json:"modules"` }
Deployment contains the configuration for the deployment of the project.
type DeploymentModules ¶
type DeploymentModules struct { // Main contains the configuration for the main deployment module. Main Module `json:"main"` // Support contains the configuration for the support deployment modules. // +optional Support map[string]Module `json:"support"` }
Deployment contains the configuration for the deployment of the project.
type Global ¶
type Global struct { // CI contains the configuration for the CI system. // +optional CI GlobalCI `json:"ci"` // Deployment contains the global configuration for the deployment of projects. // +optional Deployment GlobalDeployment `json:"deployment"` // Repo contains the configuration for the GitHub repository. Repo GlobalRepo `json:"repo"` }
Global contains the global configuration for the blueprint.
type GlobalCI ¶
type GlobalCI struct { // Local defines the filters to use when simulating a local CI run. Local []string `json:"local"` // Providers contains the configuration for the providers being used by the CI system. // +optional Providers Providers `json:"providers"` // Registries contains the container registries to push images to. // +optional Registries []string `json:"registries"` // Secrets contains global secrets that will be passed to all targets. // +optional Secrets []Secret `json:"secrets"` }
CI contains the configuration for the CI system.
type GlobalDeployment ¶
type GlobalDeployment struct { // Registry contains the URL of the container registry holding the deployment code. Registry string `json:"registry"` // Repo contains the configuration for the global deployment repository. Repo GlobalDeploymentRepo `json:"repo"` // Root contains the root deployment directory in the deployment repository. Root string `json:"root"` }
GlobalDeployment contains the configuration for the global deployment of projects.
type GlobalDeploymentRepo ¶
type GlobalDeploymentRepo struct { // Ref contains the ref to use for the deployment repository. Ref string `json:"ref"` // URL contains the URL of the deployment repository. Url string `json:"url"` }
GlobalDeploymentRepo contains the configuration for the global deployment repository.
type GlobalRepo ¶
type Module ¶
type Module struct { // Container contains the name of the container holding the deployment code. // Defaults to <module_name>-deployment). For the main module, <module_name> is the project name. // +optional Container *string `json:"container"` // Namespace contains the namespace to deploy the module to. Namespace string `json:"namespace"` // Values contains the values to pass to the deployment module. Values any `json:"values"` // Version contains the version of the deployment module. Version string `json:"version"` }
Module contains the configuration for a deployment module.
type Project ¶
type Project struct { // Name contains the name of the project. Name string `json:"name"` // Container is the name that the container will be built as. Container string `json:"container"` // CI contains the configuration for the CI system. // +optional CI ProjectCI `json:"ci"` // Deployment contains the configuration for the deployment of the project. // +optional Deployment Deployment `json:"deployment"` // Release contains the configuration for the release of the project. // +optional Release map[string]Release `json:"release"` }
Project contains the configuration for the project.
type ProviderAWS ¶
type ProviderAWS struct { // ECR contains the configuration for AWS ECR. // +optional ECR ProviderAWSECR `json:"ecr"` // Role contains the role to assume. Role string `json:"role"` // Region contains the region to use. Region string `json:"region"` }
ProviderAWS contains the configuration for the AWS provider.
type ProviderAWSECR ¶
type ProviderCue ¶
type ProviderCue struct { // Install contains whether to install CUE in the CI environment. // +optional Install *bool `json:"install"` // Registry contains the CUE registry to use. Registry *string `json:"registry"` // RegistryPrefix contains the prefix to use for CUE registries. // +optional RegistryPrefix *string `json:"registryPrefix"` // The version of CUE to use in CI. // +optional Version string `json:"version"` }
ProviderCue contains the configuration for the CUE provider.
type ProviderDocker ¶
type ProviderDocker struct { // Credentials contains the credentials to use for DockerHub Credentials Secret `json:"credentials"` }
ProviderDocker contains the configuration for the DockerHub provider.
type ProviderEarthly ¶
type ProviderEarthly struct { // Credentials contains the credentials to use for Earthly Cloud // +optional Credentials Secret `json:"credentials"` // Org specifies the Earthly Cloud organization to use. // +optional Org *string `json:"org"` // Satellite contains the satellite to use for caching. // +optional Satellite *string `json:"satellite"` // The version of Earthly to use in CI. // +optional Version *string `json:"version"` }
ProviderEarthly contains the configuration for the Earthly Cloud provider.
type ProviderGit ¶
type ProviderGit struct { // Credentials contains the credentials to use for interacting with private repositories. // +optional Credentials *Secret `json:"credentials"` }
ProviderGit contains the configuration for the Git provider.
type ProviderGithub ¶
type ProviderGithub struct { // Credentials contains the credentials to use for Github // +optional Credentials Secret `json:"credentials"` // Registry contains the Github registry to use. // +optional Registry *string `json:"registry"` }
ProviderGithub contains the configuration for the Github provider.
type Providers ¶
type Providers struct { // AWS contains the configuration for the AWS provider. // +optional AWS ProviderAWS `json:"aws"` // CUE contains the configuration for the CUE provider. // +optional CUE ProviderCue `json:"cue"` // Docker contains the configuration for the DockerHub provider. // +optional Docker ProviderDocker `json:"docker"` // Earthly contains the configuration for the Earthly Cloud provider. // +optional Earthly ProviderEarthly `json:"earthly"` // Git contains the configuration for the Git provider. // +optional Git ProviderGit `json:"git"` // Github contains the configuration for the Github provider. // +optional Github ProviderGithub `json:"github"` // Timoni contains the configuration for the Timoni provider. // +optional Timoni TimoniProvider `json:"timoni"` }
Providers contains the configuration for the providers being used by the CI system.
type Release ¶
type Release struct { // Config contains the configuration to pass to the release. // +optional Config any `json:"config"` // On contains the events that trigger the release. On map[string]any `json:"on"` // Target is the Earthly target to run for this release. // Defaults to release name. // +optional Target string `json:"target"` }
Release contains the configuration for a project release.
type SchemaFile ¶
SchemaFile contains the schema for blueprint files.
func LoadSchema ¶
func LoadSchema(ctx *cue.Context) (SchemaFile, error)
LoadSchema loads the schema from the embedded schema file.
type Secret ¶
type Secret struct { // Maps contains mappings for Earthly secret names to JSON keys in the secret. // Mutually exclusive with Name. // +optional Maps map[string]string `json:"maps"` // Name contains the name of the Earthly secret to use. // Mutually exclusive with Maps. // +optional Name *string `json:"name"` // Optional determines if the secret is optional. // +optional Optional *bool `json:"optional"` // Path contains the path to the secret. Path string `json:"path"` // Provider contains the provider to use for the secret. Provider string `json:"provider"` }
Secret contains the secret provider and a list of mappings
type Target ¶
type Target struct { // Args contains the arguments to pass to the target. // +optional Args map[string]string `json:"args"` // Platforms contains the platforms to run the target against. // +optional Platforms []string `json:"platforms"` // Privileged determines if the target should run in privileged mode. // +optional Privileged *bool `json:"privileged"` // Retries contains the number of times to retry the target. // +optional Retries *int `json:"retries"` // Secrets contains the secrets to pass to the target. // +optional Secrets []Secret `json:"secrets"` }
Target contains the configuration for a single target.
type TimoniProvider ¶
type TimoniProvider struct { // Install contains whether to install Timoni in the CI environment. // +optional Install *bool `json:"install"` // Registries contains the registries to use for publishing Timoni modules Registries []string `json:"registries"` // The version of Timoni to use in CI. // +optional Version string `json:"version"` }
TimoniProvider contains the configuration for the Timoni provider.