deployment

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2024 License: Apache-2.0, MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const GIT_EMAIL = "forge@projectcatalyst.io"
View Source
const GIT_MESSAGE = "chore: automatic deployment for %s"
View Source
const GIT_NAME = "Catalyst Forge"

Variables

View Source
var ErrNoChanges = fmt.Errorf("no changes to commit")

Functions

func GetGitToken

func GetGitToken(project *project.Project, store *secrets.SecretStore, logger *slog.Logger) (string, error)

GetGitToken loads the Git token from the project.

Types

type Bundle

type Bundle struct {
	ApiVersion string                    `json:"apiVersion"`
	Name       string                    `json:"name"`
	Instances  map[string]BundleInstance `json:"instances"`
	// contains filtered or unexported fields
}

Bundle represents a Timoni bundle file.

func GenerateBundle

func GenerateBundle(project *project.Project) (Bundle, error)

GenerateBundle generates a Timoni bundle file from a project.

func (Bundle) Encode

func (b Bundle) Encode() ([]byte, error)

Encode encodes the bundle into CUE syntax.

type BundleInstance

type BundleInstance struct {
	Module    Module    `json:"module"`
	Namespace string    `json:"namespace"`
	Values    cue.Value `json:"values"`
}

BundleInstance represents a single instance of a module in a Timoni bundle file.

type GitopsDeployer

type GitopsDeployer struct {
	// contains filtered or unexported fields
}

GitopsDeployer is a deployer that deploys projects to a GitOps repository.

func NewGitopsDeployer

func NewGitopsDeployer(
	project *project.Project,
	store *secrets.SecretStore,
	logger *slog.Logger,
) GitopsDeployer

NewGitopsDeployer creates a new GitopsDeployer.

func (*GitopsDeployer) Deploy

func (g *GitopsDeployer) Deploy() error

func (*GitopsDeployer) Load

func (g *GitopsDeployer) Load() error

Load loads the repository for the project.

type Module

type Module struct {
	Digest  string `json:"digest"`
	Url     string `json:"url"`
	Version string `json:"version"`
}

Module represents a single module in a Timoni bundle file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL