Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DockerCmd = &cobra.Command{ Version: "v0.0.1", Use: "docker", Long: `The 'docker' command automates various Continuous Integration (Docker-related) tasks. You can specify the tasks you want to perform using the provided --task flag.`, Example: ` # Build a docker image from an existing DockerFile: stiletto docker --task=build`, Run: func(cmd *cobra.Command, args []string) { ux := tui.TUITitle{} msg := tui.NewTUIMessage() config.ShowCLITitle() cliGlobalArgs := config.GetCLIGlobalArgs() p, err := pipeline.New(cliGlobalArgs.WorkingDir, cliGlobalArgs.MountDir, cliGlobalArgs.TargetDir, cliGlobalArgs.TaskName, cliGlobalArgs.ScanEnvVarKeys, cliGlobalArgs.EnvKeyValuePairsToSetString, cliGlobalArgs.ScanAWSKeys, cliGlobalArgs.ScanTerraformVars, cliGlobalArgs.InitDaggerWithWorkDirByDefault) if err != nil { msg.ShowError("INIT", "Failed pipeline initialization", err) os.Exit(1) } ux.ShowSubTitle("JOB:", "DOCKER") ux.ShowInitDetails("DOCKER", cliGlobalArgs.TaskName, p.PipelineOpts.WorkDirPath, p.PipelineOpts.TargetDirPath, p.PipelineOpts.MountDirPath) j, err := job.NewJob(p, job.InitOptions{ Name: cliGlobalArgs.TaskName, Stack: "DOCKER", PipelineCfg: p, WorkDir: p.PipelineOpts.WorkDir, TargetDir: p.PipelineOpts.TargetDir, MountDir: p.PipelineOpts.MountDir, ScanAWSEnvVars: cliGlobalArgs.ScanAWSKeys, ScanTerraformEnvVars: cliGlobalArgs.ScanTerraformVars, EnvVarsToSet: cliGlobalArgs.EnvKeyValuePairsToSetString, EnvVarsToScan: cliGlobalArgs.ScanEnvVarKeys, }) if err != nil { msg.ShowError("INIT", "Failed job initialization", err) os.Exit(1) } ux.ShowSubTitle("TASK:", cliGlobalArgs.TaskName) ux.ShowTaskDetails("DOCKER", cliGlobalArgs.TaskName, j.WorkDirPath, j.TargetDirPath, j.MountDirPath) taskErr := task.RunTaskDocker(task.InitOptions{ Task: cliGlobalArgs.TaskName, Stack: "DOCKER", PipelineCfg: p, JobCfg: j, WorkDir: p.PipelineOpts.WorkDir, MountDir: p.PipelineOpts.MountDir, TargetDir: p.PipelineOpts.TargetDir, ActionCommands: cliGlobalArgs.CustomCommands, }) if taskErr != nil { msg.ShowError("", "Failed to run task", taskErr) os.Exit(1) } }, }
Functions ¶
func AddCIArguments ¶
func AddCIArguments()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.