remote

package
v0.0.0-...-06d3161 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TestCommand is the command to run test remotely
	TestCommand = "test"
	// DeployCommand is the command to deploy a dev environment remotely
	DeployCommand = "deploy"
	// DestroyCommand is the command to destroy a dev environment remotely
	DestroyCommand = "destroy"
)

Variables

This section is empty.

Functions

func CreateDockerignoreFileWithFilesystem

func CreateDockerignoreFileWithFilesystem(cwd, tmpDir string, fs afero.Fs) error

CreateDockerignoreFileWithFilesystem creates a .dockerignore file in the tmpDir with the content of the .dockerignore file in the cwd

Types

type Builder

type Builder interface {
	Run(ctx context.Context, buildOptions *types.BuildOptions, ioCtrl *io.Controller) error
}

Builder is the interface to run the build of the Dockerfile to execute remote commands like deploy and destroy

type OktetoClientProvider

type OktetoClientProvider interface {
	Provide(opts ...okteto.Option) (types.OktetoInterface, error)
}

type Params

type Params struct {
	BuildEnvVars        map[string]string
	DependenciesEnvVars map[string]string
	Manifest            *model.Manifest
	BaseImage           string
	ManifestPathFlag    string
	TemplateName        string
	DockerfileName      string
	KnownHostsPath      string
	Command             string
	// ContextAbsolutePathOverride is the absolute path for the build context. Optional.
	// If this values is not defined it will default to the folder location of the
	// okteto manifest which is resolved through params.ManifestPathFlag
	ContextAbsolutePathOverride string
	// CacheInvalidationKey is the value use to invalidate the cache. Defaults
	// to a random value which essentially means no-cache. Setting this to a
	// static or known value will reuse the build cache
	CacheInvalidationKey string
	Deployable           deployable.Entity
	CommandFlags         []string
	Caches               []string
}

Params struct to pass the necessary parameters to create the Dockerfile

type Runner

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

Runner struct in charge of creating the Dockerfile for remote execution of commands like deploy and destroy and running the build

func NewRunner

func NewRunner(ioCtrl *io.Controller, builder Builder) *Runner

NewRunner creates a new Runner for remote

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, params *Params) error

Run This function is the one in charge of creating the Dockerfile needed to run remote execution of commands like destroy and deploy and triggers the build

Jump to

Keyboard shortcuts

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