feat(cli): add --provisioner-log-debug option (#14558)

Allows starting a build in debug mode from the CLI without needing
to have the build fail first by adding `--provisioner-log-debug`.
This commit is contained in:
Cian Johnston
2024-09-04 14:39:35 +01:00
committed by GitHub
parent bd90740166
commit bcf9bc3c90
8 changed files with 77 additions and 24 deletions

View File

@ -127,3 +127,21 @@ func parseParameterMapFile(parameterFile string) (map[string]string, error) {
}
return parameterMap, nil
}
// buildFlags contains options relating to troubleshooting provisioner jobs.
type buildFlags struct {
provisionerLogDebug bool
}
func (bf *buildFlags) cliOptions() []serpent.Option {
return []serpent.Option{
{
Flag: "provisioner-log-debug",
Description: `Sets the provisioner log level to debug.
This will print additional information about the build process.
This is useful for troubleshooting build issues.`,
Value: serpent.BoolOf(&bf.provisionerLogDebug),
Hidden: true,
},
}
}