daggerio

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ContainerMountPathPrefix = "/build"

Variables

View Source
var StackImagesMap = map[string]string{
	"PYTHON":     "python:3.8.5-slim-buster",
	"DOCKER":     "docker:23.0.1-dind",
	"TERRAFORM":  "hashicorp/terraform:1.3.9",
	"TERRAGRUNT": "alpine/terragrunt",

	"AWS":    "alpine:latest",
	"ALPINE": "alpine:latest",
}

Functions

func AuthWithRegistry

func AuthWithRegistry(c *dagger.Client, container *dagger.Container,
	opt RegistryAuthOptions) (*dagger.Container,
	error)

func BuildImage

func BuildImage(dockerFilePath string, client *dagger.Client,
	container *dagger.Container) (*dagger.Container, error)

BuildImage builds the image of the dagger client.

func GetContainer

func GetContainer(c *dagger.Client, image string) (*dagger.Container, error)

GetContainer returns the container of the dagger client.

func GetContainerImagePerStack

func GetContainerImagePerStack(stack string, version string) (string, error)

GetContainerImagePerStack returns the container image of the dagger client.

func GetDaggerDir

func GetDaggerDir(c *dagger.Client, dir string) (*dagger.Directory, error)

GetDaggerDir returns the working directory of the dagger client.

func GetDaggerDirWithEntriesCheck

func GetDaggerDirWithEntriesCheck(c *dagger.Client, dir string) (*dagger.Directory, error)

GetDaggerDirWithEntriesCheck returns the working directory of the dagger client.

func ListEntries

func ListEntries(d *dagger.Directory, failIsEmpty bool, ctx *context.Context) ([]string, error)

ListEntries lists the entries in a dagger directory.

func MountDir

func MountDir(c *dagger.Container, workDir *dagger.Directory, execPath string) (*dagger.
	Container, error)

MountDir mounts a directory from the host to the container.

func NewDaggerClient

func NewDaggerClient(workDir string, ctx *context.Context, isWorkDirSetInClient bool) (*dagger.
	Client, error)

func NormaliseDaggerPath

func NormaliseDaggerPath(path string) string

NormaliseDaggerPath will check if the path includes a / at the beginning; if so, just return it; if not, add it.

func PushImage

func PushImage(container *dagger.Container, url string, ctx context.Context) (string, error)

PushImage pushes the image to the dagger client.

func SetEnvVarsInContainer

func SetEnvVarsInContainer(c *dagger.Container, envVars map[string]string) (*dagger.Container,
	error)

func VerifyFileEntriesInMountedDir

func VerifyFileEntriesInMountedDir(c *dagger.Client, dir string, files []string,
	ctx context.Context) error

Types

type DaggerContainerImage

type DaggerContainerImage struct {
	Image   string
	Version string
}

func GetContainerImageCustom

func GetContainerImageCustom(imageURL, version string) (DaggerContainerImage, error)

GetContainerImageCustom DaggerContainerImage represents the container image of the dagger client.

type DaggerSecret

type DaggerSecret struct {
	SecretId    string
	SecretValue string
}

type RegistryAuthOptions

type RegistryAuthOptions struct {
	RegistryAddress string
	RegistryUser    string
	RegistrySecret  DaggerSecret
}

Jump to

Keyboard shortcuts

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