provision

package
v1.57.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 60 Imported by: 0

Documentation

Overview

Package provision implements a 'devenv provision' command that allows developers to provision a new development environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdProvision

func NewCmdProvision(log logrus.FieldLogger) *cli.Command

Types

type Options

type Options struct {
	DeployApps        []string
	SnapshotTarget    string
	SnapshotChannel   box.SnapshotLockChannel
	Snapshot          string
	KubernetesRuntime kubernetesruntime.Runtime
	KubernetesVersion string
	Base              bool
	UseDevspace       bool

	// DestroyOnFailure denotes if we should destroy the kubernetes cluster if it
	// fails to provision.
	DestroyOnFailure bool

	// ProvisionTimeout is the amount of time to wait before considering a snapshot
	// provision failure as a timeout and destroying the cluster if DestroyOnFailure
	// is true.
	ProvisionTimeout time.Duration
	// contains filtered or unexported fields
}

func NewOptions

func NewOptions(log logrus.FieldLogger, b *box.Config) (*Options, error)

NewOptions creates a new provision command

func (*Options) MarshalLog added in v1.38.0

func (o *Options) MarshalLog(addField func(key string, v interface{}))

func (*Options) Run

func (o *Options) Run(ctx context.Context) error

Run runs the provision command

type PostRestoreVariables added in v1.57.0

type PostRestoreVariables struct {
	// User is the current user's username according to the host
	// operating system.
	User string

	// Email is the current user's email according to git, retrieved
	// via `git config user.email`.
	Email string

	// ClusterRuntime is the configuration for the cluster runtime that
	// is in use in this devenv.
	ClusterRuntime kubernetesruntime.RuntimeConfig

	// CI denotes if we are in a CI environment or not.
	CI PostRestoreVariablesCI
}

PostRestoreVariables is the set of variables that are available to the post-restore manifest templates.

type PostRestoreVariablesCI added in v1.57.0

type PostRestoreVariablesCI struct {
	// JobNumber is the current job number in the CI environment.
	// For CircleCI this is the build number.
	JobID string

	// JobName is the name of the job in the CI environment that is
	// running the devenv. In CircleCI, this is the CIRCLE_JOB environment
	// variable.
	//
	// Example: shared/e2e
	JobName string

	// ProjectName is the name of the project in the CI environment that
	// is running the devenv. In CircleCI, this is the PROJECT_USERNAME
	// and PROJECT_REPONAME environment variables combined with a slash.
	//
	// Example: getoutreach/devenv
	ProjectName string

	// PullRequestNumber is the pull request number that is being tested
	// in the CI environment. In CircleCI, this is the PULL_REQUEST_NUMBER
	// environment variable, if it exists.
	PullRequestNumber string

	// Branch is the branch that is being tested in the CI environment.
	// In CircleCI, this is the CIRCLE_BRANCH environment variable.
	Branch string
}

Jump to

Keyboard shortcuts

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