log name of postprocessor running to disambiguate long chains of pps

This commit is contained in:
Megan Marsh 2020-01-15 14:07:53 -08:00
parent 83dc0a7c8b
commit e228a5bcb9
2 changed files with 7 additions and 1 deletions

View File

@ -109,6 +109,7 @@ type CoreBuild struct {
type CoreBuildPostProcessor struct {
PostProcessor PostProcessor
PType string
PName string
config map[string]interface{}
keepInputArtifact *bool
}
@ -297,7 +298,11 @@ PostProcessorRunSeqLoop:
Ui: originalUi,
}
builderUi.Say(fmt.Sprintf("Running post-processor: %s", corePP.PType))
if corePP.PName == corePP.PType {
builderUi.Say(fmt.Sprintf("Running post-processor: %s", corePP.PType))
} else {
builderUi.Say(fmt.Sprintf("Running post-processor: %s (type %s)", corePP.PName, corePP.PType))
}
ts := CheckpointReporter.AddSpan(corePP.PType, "post-processor", corePP.config)
artifact, defaultKeep, forceOverride, err := corePP.PostProcessor.PostProcess(ctx, ppUi, priorArtifact)
ts.End(err)

View File

@ -258,6 +258,7 @@ func (c *Core) Build(n string) (Build, error) {
current = append(current, CoreBuildPostProcessor{
PostProcessor: postProcessor,
PType: rawP.Type,
PName: rawP.Name,
config: rawP.Config,
keepInputArtifact: rawP.KeepInputArtifact,
})