You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-11-06 09:09:19 +02:00
pass stepName to maven utils for mavenBuild
This commit is contained in:
@@ -23,7 +23,7 @@ const (
|
||||
)
|
||||
|
||||
func mavenBuild(config mavenBuildOptions, telemetryData *telemetry.CustomData, commonPipelineEnvironment *mavenBuildCommonPipelineEnvironment) {
|
||||
utils := maven.NewUtilsBundle()
|
||||
utils := maven.NewUtilsBundle("mavenBuild")
|
||||
|
||||
err := runMavenBuild(&config, telemetryData, utils, commonPipelineEnvironment)
|
||||
if err != nil {
|
||||
|
||||
@@ -2,17 +2,18 @@ package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/SAP/jenkins-library/pkg/log"
|
||||
"github.com/SAP/jenkins-library/pkg/maven"
|
||||
"github.com/SAP/jenkins-library/pkg/telemetry"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"unicode"
|
||||
|
||||
"github.com/SAP/jenkins-library/pkg/log"
|
||||
"github.com/SAP/jenkins-library/pkg/maven"
|
||||
"github.com/SAP/jenkins-library/pkg/telemetry"
|
||||
)
|
||||
|
||||
func mavenExecuteIntegration(config mavenExecuteIntegrationOptions, _ *telemetry.CustomData) {
|
||||
err := runMavenExecuteIntegration(&config, maven.NewUtilsBundle())
|
||||
err := runMavenExecuteIntegration(&config, maven.NewUtilsBundle(""))
|
||||
if err != nil {
|
||||
log.Entry().WithError(err).Fatal("step execution failed")
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/SAP/jenkins-library/pkg/log"
|
||||
"github.com/SAP/jenkins-library/pkg/maven"
|
||||
"github.com/SAP/jenkins-library/pkg/telemetry"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func mavenExecuteStaticCodeChecks(config mavenExecuteStaticCodeChecksOptions, telemetryData *telemetry.CustomData) {
|
||||
err := runMavenStaticCodeChecks(&config, telemetryData, maven.NewUtilsBundle())
|
||||
err := runMavenStaticCodeChecks(&config, telemetryData, maven.NewUtilsBundle(""))
|
||||
if err != nil {
|
||||
log.Entry().WithError(err).Fatal("step execution failed")
|
||||
}
|
||||
|
||||
@@ -59,11 +59,13 @@ type utilsBundle struct {
|
||||
*piperhttp.Client
|
||||
}
|
||||
|
||||
func NewUtilsBundle() Utils {
|
||||
func NewUtilsBundle(stepName string) Utils {
|
||||
utils := utilsBundle{
|
||||
Command: &command.Command{},
|
||||
Files: &piperutils.Files{},
|
||||
Client: &piperhttp.Client{},
|
||||
Command: &command.Command{
|
||||
StepName: stepName,
|
||||
},
|
||||
Files: &piperutils.Files{},
|
||||
Client: &piperhttp.Client{},
|
||||
}
|
||||
utils.Stdout(log.Writer())
|
||||
utils.Stderr(log.Writer())
|
||||
|
||||
@@ -33,7 +33,7 @@ func (m *Maven) init() {
|
||||
}
|
||||
|
||||
if m.utils == nil {
|
||||
m.utils = maven.NewUtilsBundle()
|
||||
m.utils = maven.NewUtilsBundle("")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user