You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-09-16 09:26:22 +02:00
disable resources in another way
This commit is contained in:
@@ -100,7 +100,8 @@ func (cfg *{{ .StepName }}Options) readInValues() error {
|
||||
// {{.CobraCmdFuncName}} {{.Short}}
|
||||
func {{.CobraCmdFuncName}}() *cobra.Command {
|
||||
var stepConfig {{.StepName}}Options
|
||||
var commonPipelineEnvironment {{ .StepName }}CommonPipelineEnvironment
|
||||
{{- range $notused, $oRes := .OutputResources }}
|
||||
var {{ index $oRes "name" }} {{ index $oRes "objectname" }}{{ end }}
|
||||
var dummyTelemetryData telemetry.CustomData
|
||||
|
||||
var {{.StepName}}Cmd = &cobra.Command{
|
||||
@@ -555,6 +556,9 @@ func getOutputResourceDetails(stepData *config.StepData) ([]map[string]string, e
|
||||
currentResource["objectname"] = envResource.StructName()
|
||||
outputResources = append(outputResources, currentResource)
|
||||
case "influx":
|
||||
|
||||
continue // disable this resource
|
||||
|
||||
var influxResource InfluxResource
|
||||
influxResource.Name = res.Name
|
||||
influxResource.StepName = stepData.Metadata.Name
|
||||
@@ -585,6 +589,9 @@ func getOutputResourceDetails(stepData *config.StepData) ([]map[string]string, e
|
||||
currentResource["objectname"] = influxResource.StructName()
|
||||
outputResources = append(outputResources, currentResource)
|
||||
case "reports":
|
||||
|
||||
continue // disable this resource
|
||||
|
||||
var reportsResource ReportsResource
|
||||
reportsResource.Name = res.Name
|
||||
reportsResource.StepName = stepData.Metadata.Name
|
||||
|
@@ -172,7 +172,6 @@ func (i *{{ .StepName }}{{ .Name | title}}) persist(path, resourceName string) {
|
||||
|
||||
// StructString returns the golang coding for the struct definition of the InfluxResource
|
||||
func (i *InfluxResource) StructString() (string, error) {
|
||||
return "", nil // disable this resource
|
||||
funcMap := template.FuncMap{
|
||||
"title": piperutils.Title,
|
||||
"golangName": golangName,
|
||||
@@ -255,7 +254,6 @@ func (p *ReportsResource) StructName() string {
|
||||
|
||||
// StructString returns the golang coding for the struct definition of the environment resource
|
||||
func (p *ReportsResource) StructString() (string, error) {
|
||||
return "", nil // disable this resource
|
||||
funcMap := template.FuncMap{
|
||||
"title": piperutils.Title,
|
||||
"golangName": golangName,
|
||||
|
Reference in New Issue
Block a user