1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-03-03 15:02:35 +02:00

improve enabling of Maven access log generation

This commit is contained in:
I557621 2023-06-19 12:08:49 +02:00
parent a4f99ae160
commit 80b77223cd

View File

@ -59,13 +59,18 @@ type utilsBundle struct {
*piperhttp.Client
}
// NewUtilsBundle provides methods that are used for running a step.
// Setting the stepName parameter to a non-empty string will enable the creation of an access log (URL log).
func NewUtilsBundle(stepName string) Utils {
cmd := &command.Command{}
if stepName != "" {
cmd.StepName = stepName
}
utils := utilsBundle{
Command: &command.Command{
StepName: stepName,
},
Files: &piperutils.Files{},
Client: &piperhttp.Client{},
Command: cmd,
Files: &piperutils.Files{},
Client: &piperhttp.Client{},
}
utils.Stdout(log.Writer())
utils.Stderr(log.Writer())