deployment

package
v0.0.0-...-e25a249 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deployment

type Deployment struct {
	Name      string
	Variables map[string]string
	Config    struct {
		SSH map[string]SSHConfig
	}
	Jobs []map[string]any
}

A deployment is the configuration file that contain all the instructions to deploy your project.

type JobContext

type JobContext struct {
	context.Context
	JobName string
	// contains filtered or unexported fields
}

A JobContext is passed to each executed jobs. It it provide useful functions for executing commands, logging output, and more!

func NewJobContext

func NewJobContext(jobName string, client *remote.Client, logger func(data string)) (*JobContext, context.CancelFunc)

Create a new JobContext.

func (*JobContext) ExecuteCommand

func (p *JobContext) ExecuteCommand(command string) (string, error)

Execute a command on the remote host.

func (*JobContext) Log

func (p *JobContext) Log(data string)

Log a message to the logger, the output will be logged to the deployment log.

type SSHConfig

type SSHConfig struct {
	Host       string
	Port       uint16
	Type       string
	Username   string
	Password   string
	KeyFile    string `yaml:"key_file"`
	KeyContent string `yaml:"key_content"`
	KeyPass    string `yaml:"key_pass"`
}

The SSHConfig struct hold a SSH configuration for a single host

Jump to

Keyboard shortcuts

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