Documentation ¶
Index ¶
- Constants
- type Builder
- type DeployOptions
- type Deployer
- type Deployment
- func (d *Deployment) CompareRemotes(remoteURL string) error
- func (d *Deployment) Deploy(cli *docker.Client, out io.Writer, opts DeployOptions) error
- func (d *Deployment) Destroy(cli *docker.Client, out io.Writer) error
- func (d *Deployment) Down(cli *docker.Client, out io.Writer) error
- func (d *Deployment) GetBranch() string
- func (d *Deployment) GetDataManager() (manager *DeploymentDataManager, found bool)
- func (d *Deployment) GetStatus(cli *docker.Client) (*common.DeploymentStatus, error)
- func (d *Deployment) SetConfig(cfg DeploymentConfig)
- type DeploymentConfig
- type DeploymentDataManager
Constants ¶
const ( // DockerComposeVersion is the version of docker-compose used DockerComposeVersion = "docker/compose:1.21.0" // HerokuishVersion is the version of Herokuish used HerokuishVersion = "gliderlabs/herokuish:v0.4.0" // BuildStageName specifies the name of build stage containers BuildStageName = "build" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
Builder builds projects and returns a callback that can be used to deploy the project. No relation to Bob the Builder, though a Bob did write this.
type DeployOptions ¶
type DeployOptions struct {
SkipUpdate bool
}
DeployOptions is used to configure how the deployment handles the deploy
type Deployer ¶
type Deployer interface { Deploy(*docker.Client, io.Writer, DeployOptions) error Down(*docker.Client, io.Writer) error Destroy(*docker.Client, io.Writer) error GetStatus(*docker.Client) (*common.DeploymentStatus, error) SetConfig(DeploymentConfig) GetBranch() string CompareRemotes(string) error GetDataManager() (*DeploymentDataManager, bool) }
Deployer does great deploys
type Deployment ¶
type Deployment struct {
// contains filtered or unexported fields
}
Deployment represents the deployed project
func NewDeployment ¶
func NewDeployment(cfg DeploymentConfig, out io.Writer) (*Deployment, error)
NewDeployment creates a new deployment
func (*Deployment) CompareRemotes ¶
func (d *Deployment) CompareRemotes(remoteURL string) error
CompareRemotes will compare the remote of the deployment with given remote URL and return nil if they match
func (*Deployment) Deploy ¶
func (d *Deployment) Deploy(cli *docker.Client, out io.Writer, opts DeployOptions) error
Deploy will update, build, and deploy the project
func (*Deployment) GetBranch ¶
func (d *Deployment) GetBranch() string
GetBranch returns the currently deployed branch
func (*Deployment) GetDataManager ¶
func (d *Deployment) GetDataManager() (manager *DeploymentDataManager, found bool)
GetDataManager returns the class managing deployment data
func (*Deployment) GetStatus ¶
func (d *Deployment) GetStatus(cli *docker.Client) (*common.DeploymentStatus, error)
GetStatus returns the status of the deployment
func (*Deployment) SetConfig ¶
func (d *Deployment) SetConfig(cfg DeploymentConfig)
SetConfig updates the deployment's configuration. Only supports ProjectName, Branch, and BuildType for now.
type DeploymentConfig ¶
type DeploymentConfig struct { ProjectName string BuildType string RemoteURL string Branch string PemFilePath string DatabasePath string }
DeploymentConfig is used to configure Deployment
type DeploymentDataManager ¶
type DeploymentDataManager struct {
// contains filtered or unexported fields
}
DeploymentDataManager stores persistent deployment configuration
func (*DeploymentDataManager) AddEnvVariable ¶
func (c *DeploymentDataManager) AddEnvVariable(name, value string, encrypt bool) error
AddEnvVariable adds a new environment variable that will be applied to all project containers
func (*DeploymentDataManager) GetEnvVariables ¶
func (c *DeploymentDataManager) GetEnvVariables(decrypt bool) ([]string, error)
GetEnvVariables retrieves all stored environment variables
func (*DeploymentDataManager) RemoveEnvVariable ¶
func (c *DeploymentDataManager) RemoveEnvVariable(name string) error
RemoveEnvVariable removes a previously set env variable