Documentation
¶
Index ¶
Constants ¶
View Source
const ROOT = "config"
ROOT config dir
Variables ¶
View Source
var FLAG_FORMAT = cli.StringFlag{
Name: "format,f",
Value: "toml",
Usage: "file format, like: toml, yaml",
EnvVar: "STAGE",
}
View Source
var FLAG_HOSTS = cli.StringSliceFlag{
Name: "hosts",
Usage: "hosts filter, like: 'deploy@host1.com,deploy@host2.com'",
EnvVar: "HOSTS",
}
View Source
var FLAG_ROLES = cli.StringSliceFlag{
Name: "roles",
Usage: "roles filter, like: 'app,web'",
EnvVar: "ROLES",
}
View Source
var FLAG_STAGE = cli.StringFlag{
Name: "stage,s",
Value: "test",
Usage: "stage name like: production, development, test",
EnvVar: "STAGE",
}
View Source
var FLAG_TASK = cli.StringFlag{
Name: "task,t",
Value: "hello",
Usage: "task's name",
EnvVar: "TASK",
}
View Source
var STAGES = path.Join(ROOT, "stages")
STAGES stages dir
View Source
var TASKS = path.Join(ROOT, "tasks")
TASKS tasks dir
Functions ¶
Types ¶
type Stage ¶
type Stage struct {
Name string `toml:"-"`
//The path on the remote server where the application should be deployed.
//default "/var/www/{{.Name}}"
To string `toml:"deploy_to"`
//The Source Control Management used.
//default: :git
//Currently :git are supported.
ScmF string `toml:"scm"` //default git
//URL to the repository.
//Must be a valid URL for the used SCM.
Repo string `toml:"repo_url"`
//default master
Branch string `toml:"branch"`
//Listed files will be symlinked into each release directory during deployment.
//default []
Files []string `toml:"linked_files"`
//Listed directories will be symlinked into the release directory during deployment.
//default []
Dirs []string `toml:"linked_dirs"`
//Default shell environment used during command execution.
//default {}
Env map[string]string `toml:"default_env"`
//The last n releases are kept for possible rollbacks.
//default 5
Keep uint `toml:"keep_releases"`
//Temporary directory used during deployments to store data.
//default /tmp
Tmp string `toml:"tmp"`
Debug bool `toml:"debug"`
//split hosts by roles
Roles map[string][]string `toml:"roles"`
Keys []string `toml:"keys"`
Logger *logging.Logger `toml:"-"`
Store store.Store `toml:"-"`
Scm scm.Scm `toml:"-"`
Signers []ssh.Signer `toml:"-"`
Version string `toml:"-"`
}
Stage load from config/stages/<name>.toml
Click to show internal directories.
Click to hide internal directories.