github.com/ouraigua/jenkins-library@v0.0.0-20231028010029-fbeaf2f3aa9b/cmd/abapEnvironmentBuild_generated.go (about) 1 // Code generated by piper's step-generator. DO NOT EDIT. 2 3 package cmd 4 5 import ( 6 "fmt" 7 "os" 8 "path/filepath" 9 "time" 10 11 "github.com/SAP/jenkins-library/pkg/config" 12 "github.com/SAP/jenkins-library/pkg/log" 13 "github.com/SAP/jenkins-library/pkg/piperenv" 14 "github.com/SAP/jenkins-library/pkg/splunk" 15 "github.com/SAP/jenkins-library/pkg/telemetry" 16 "github.com/SAP/jenkins-library/pkg/validation" 17 "github.com/spf13/cobra" 18 ) 19 20 type abapEnvironmentBuildOptions struct { 21 CfAPIEndpoint string `json:"cfApiEndpoint,omitempty"` 22 CfOrg string `json:"cfOrg,omitempty"` 23 CfSpace string `json:"cfSpace,omitempty"` 24 CfServiceInstance string `json:"cfServiceInstance,omitempty"` 25 CfServiceKeyName string `json:"cfServiceKeyName,omitempty"` 26 Host string `json:"host,omitempty"` 27 AbapSourceClient string `json:"abapSourceClient,omitempty"` 28 Username string `json:"username,omitempty"` 29 Password string `json:"password,omitempty"` 30 Phase string `json:"phase,omitempty"` 31 Values string `json:"values,omitempty"` 32 DownloadAllResultFiles bool `json:"downloadAllResultFiles,omitempty"` 33 DownloadResultFilenames []string `json:"downloadResultFilenames,omitempty"` 34 PublishAllDownloadedResultFiles bool `json:"publishAllDownloadedResultFiles,omitempty"` 35 PublishResultFilenames []string `json:"publishResultFilenames,omitempty"` 36 SubDirectoryForDownload string `json:"subDirectoryForDownload,omitempty"` 37 FilenamePrefixForDownload string `json:"filenamePrefixForDownload,omitempty"` 38 TreatWarningsAsError bool `json:"treatWarningsAsError,omitempty"` 39 MaxRuntimeInMinutes int `json:"maxRuntimeInMinutes,omitempty"` 40 PollingIntervalInSeconds int `json:"pollingIntervalInSeconds,omitempty"` 41 CertificateNames []string `json:"certificateNames,omitempty"` 42 CpeValues string `json:"cpeValues,omitempty"` 43 UseFieldsOfAddonDescriptor string `json:"useFieldsOfAddonDescriptor,omitempty"` 44 ConditionOnAddonDescriptor string `json:"conditionOnAddonDescriptor,omitempty"` 45 StopOnFirstError bool `json:"stopOnFirstError,omitempty"` 46 AddonDescriptor string `json:"addonDescriptor,omitempty"` 47 } 48 49 type abapEnvironmentBuildCommonPipelineEnvironment struct { 50 abap struct { 51 buildValues string 52 } 53 } 54 55 func (p *abapEnvironmentBuildCommonPipelineEnvironment) persist(path, resourceName string) { 56 content := []struct { 57 category string 58 name string 59 value interface{} 60 }{ 61 {category: "abap", name: "buildValues", value: p.abap.buildValues}, 62 } 63 64 errCount := 0 65 for _, param := range content { 66 err := piperenv.SetResourceParameter(path, resourceName, filepath.Join(param.category, param.name), param.value) 67 if err != nil { 68 log.Entry().WithError(err).Error("Error persisting piper environment.") 69 errCount++ 70 } 71 } 72 if errCount > 0 { 73 log.Entry().Error("failed to persist Piper environment") 74 } 75 } 76 77 // AbapEnvironmentBuildCommand Executes builds as defined with the build framework 78 func AbapEnvironmentBuildCommand() *cobra.Command { 79 const STEP_NAME = "abapEnvironmentBuild" 80 81 metadata := abapEnvironmentBuildMetadata() 82 var stepConfig abapEnvironmentBuildOptions 83 var startTime time.Time 84 var commonPipelineEnvironment abapEnvironmentBuildCommonPipelineEnvironment 85 var logCollector *log.CollectorHook 86 var splunkClient *splunk.Splunk 87 telemetryClient := &telemetry.Telemetry{} 88 89 var createAbapEnvironmentBuildCmd = &cobra.Command{ 90 Use: STEP_NAME, 91 Short: "Executes builds as defined with the build framework", 92 Long: `Executes builds as defined with the build framework. Transaction overview /n/BUILD/OVERVIEW`, 93 PreRunE: func(cmd *cobra.Command, _ []string) error { 94 startTime = time.Now() 95 log.SetStepName(STEP_NAME) 96 log.SetVerbose(GeneralConfig.Verbose) 97 98 GeneralConfig.GitHubAccessTokens = ResolveAccessTokens(GeneralConfig.GitHubTokens) 99 100 path, _ := os.Getwd() 101 fatalHook := &log.FatalHook{CorrelationID: GeneralConfig.CorrelationID, Path: path} 102 log.RegisterHook(fatalHook) 103 104 err := PrepareConfig(cmd, &metadata, STEP_NAME, &stepConfig, config.OpenPiperFile) 105 if err != nil { 106 log.SetErrorCategory(log.ErrorConfiguration) 107 return err 108 } 109 log.RegisterSecret(stepConfig.Username) 110 log.RegisterSecret(stepConfig.Password) 111 112 if len(GeneralConfig.HookConfig.SentryConfig.Dsn) > 0 { 113 sentryHook := log.NewSentryHook(GeneralConfig.HookConfig.SentryConfig.Dsn, GeneralConfig.CorrelationID) 114 log.RegisterHook(&sentryHook) 115 } 116 117 if len(GeneralConfig.HookConfig.SplunkConfig.Dsn) > 0 { 118 splunkClient = &splunk.Splunk{} 119 logCollector = &log.CollectorHook{CorrelationID: GeneralConfig.CorrelationID} 120 log.RegisterHook(logCollector) 121 } 122 123 if err = log.RegisterANSHookIfConfigured(GeneralConfig.CorrelationID); err != nil { 124 log.Entry().WithError(err).Warn("failed to set up SAP Alert Notification Service log hook") 125 } 126 127 validation, err := validation.New(validation.WithJSONNamesForStructFields(), validation.WithPredefinedErrorMessages()) 128 if err != nil { 129 return err 130 } 131 if err = validation.ValidateStruct(stepConfig); err != nil { 132 log.SetErrorCategory(log.ErrorConfiguration) 133 return err 134 } 135 136 return nil 137 }, 138 Run: func(_ *cobra.Command, _ []string) { 139 stepTelemetryData := telemetry.CustomData{} 140 stepTelemetryData.ErrorCode = "1" 141 handler := func() { 142 commonPipelineEnvironment.persist(GeneralConfig.EnvRootPath, "commonPipelineEnvironment") 143 config.RemoveVaultSecretFiles() 144 stepTelemetryData.Duration = fmt.Sprintf("%v", time.Since(startTime).Milliseconds()) 145 stepTelemetryData.ErrorCategory = log.GetErrorCategory().String() 146 stepTelemetryData.PiperCommitHash = GitCommit 147 telemetryClient.SetData(&stepTelemetryData) 148 telemetryClient.Send() 149 if len(GeneralConfig.HookConfig.SplunkConfig.Dsn) > 0 { 150 splunkClient.Initialize(GeneralConfig.CorrelationID, 151 GeneralConfig.HookConfig.SplunkConfig.Dsn, 152 GeneralConfig.HookConfig.SplunkConfig.Token, 153 GeneralConfig.HookConfig.SplunkConfig.Index, 154 GeneralConfig.HookConfig.SplunkConfig.SendLogs) 155 splunkClient.Send(telemetryClient.GetData(), logCollector) 156 } 157 if len(GeneralConfig.HookConfig.SplunkConfig.ProdCriblEndpoint) > 0 { 158 splunkClient.Initialize(GeneralConfig.CorrelationID, 159 GeneralConfig.HookConfig.SplunkConfig.ProdCriblEndpoint, 160 GeneralConfig.HookConfig.SplunkConfig.ProdCriblToken, 161 GeneralConfig.HookConfig.SplunkConfig.ProdCriblIndex, 162 GeneralConfig.HookConfig.SplunkConfig.SendLogs) 163 splunkClient.Send(telemetryClient.GetData(), logCollector) 164 } 165 } 166 log.DeferExitHandler(handler) 167 defer handler() 168 telemetryClient.Initialize(GeneralConfig.NoTelemetry, STEP_NAME) 169 abapEnvironmentBuild(stepConfig, &stepTelemetryData, &commonPipelineEnvironment) 170 stepTelemetryData.ErrorCode = "0" 171 log.Entry().Info("SUCCESS") 172 }, 173 } 174 175 addAbapEnvironmentBuildFlags(createAbapEnvironmentBuildCmd, &stepConfig) 176 return createAbapEnvironmentBuildCmd 177 } 178 179 func addAbapEnvironmentBuildFlags(cmd *cobra.Command, stepConfig *abapEnvironmentBuildOptions) { 180 cmd.Flags().StringVar(&stepConfig.CfAPIEndpoint, "cfApiEndpoint", os.Getenv("PIPER_cfApiEndpoint"), "Cloud Foundry API endpoint") 181 cmd.Flags().StringVar(&stepConfig.CfOrg, "cfOrg", os.Getenv("PIPER_cfOrg"), "Cloud Foundry target organization") 182 cmd.Flags().StringVar(&stepConfig.CfSpace, "cfSpace", os.Getenv("PIPER_cfSpace"), "Cloud Foundry target space") 183 cmd.Flags().StringVar(&stepConfig.CfServiceInstance, "cfServiceInstance", os.Getenv("PIPER_cfServiceInstance"), "Cloud Foundry Service Instance") 184 cmd.Flags().StringVar(&stepConfig.CfServiceKeyName, "cfServiceKeyName", os.Getenv("PIPER_cfServiceKeyName"), "Cloud Foundry Service Key") 185 cmd.Flags().StringVar(&stepConfig.Host, "host", os.Getenv("PIPER_host"), "Specifies the host address of the SAP BTP ABAP Environment system") 186 cmd.Flags().StringVar(&stepConfig.AbapSourceClient, "abapSourceClient", os.Getenv("PIPER_abapSourceClient"), "Specifies the client of the SAP BTP ABAP Environment system, use only in combination with host") 187 cmd.Flags().StringVar(&stepConfig.Username, "username", os.Getenv("PIPER_username"), "User") 188 cmd.Flags().StringVar(&stepConfig.Password, "password", os.Getenv("PIPER_password"), "Password") 189 cmd.Flags().StringVar(&stepConfig.Phase, "phase", os.Getenv("PIPER_phase"), "Phase as specified in the build script in the backend system") 190 cmd.Flags().StringVar(&stepConfig.Values, "values", os.Getenv("PIPER_values"), "Input values for the build framework, please enter in the format '[{\"value_id\":\"Id1\",\"value\":\"value1\"},{\"value_id\":\"Id2\",\"value\":\"value2\"}]'") 191 cmd.Flags().BoolVar(&stepConfig.DownloadAllResultFiles, "downloadAllResultFiles", false, "If true, all build artefacts are downloaded") 192 cmd.Flags().StringSliceVar(&stepConfig.DownloadResultFilenames, "downloadResultFilenames", []string{}, "Only the specified files are downloaded. If downloadAllResultFiles is true, this parameter is ignored") 193 cmd.Flags().BoolVar(&stepConfig.PublishAllDownloadedResultFiles, "publishAllDownloadedResultFiles", false, "If true, it publishes all downloaded files") 194 cmd.Flags().StringSliceVar(&stepConfig.PublishResultFilenames, "publishResultFilenames", []string{}, "Only the specified files get published, in case the file was not downloaded before an error occures") 195 cmd.Flags().StringVar(&stepConfig.SubDirectoryForDownload, "subDirectoryForDownload", os.Getenv("PIPER_subDirectoryForDownload"), "Target directory to store the downloaded files, {buildID} and {taskID} can be used and will be resolved accordingly") 196 cmd.Flags().StringVar(&stepConfig.FilenamePrefixForDownload, "filenamePrefixForDownload", os.Getenv("PIPER_filenamePrefixForDownload"), "Filename prefix for the downloaded files, {buildID} and {taskID} can be used and will be resolved accordingly") 197 cmd.Flags().BoolVar(&stepConfig.TreatWarningsAsError, "treatWarningsAsError", false, "If a warrning occures, the step will be set to unstable") 198 cmd.Flags().IntVar(&stepConfig.MaxRuntimeInMinutes, "maxRuntimeInMinutes", 360, "maximal runtime of the step in minutes") 199 cmd.Flags().IntVar(&stepConfig.PollingIntervalInSeconds, "pollingIntervalInSeconds", 60, "wait time in seconds till next status request in the backend system") 200 cmd.Flags().StringSliceVar(&stepConfig.CertificateNames, "certificateNames", []string{}, "certificates for the backend system, this certificates needs to be stored in .pipeline/trustStore") 201 cmd.Flags().StringVar(&stepConfig.CpeValues, "cpeValues", os.Getenv("PIPER_cpeValues"), "Values taken from the previous step, if a value was also specified in the config file, the value from cpe will be discarded") 202 cmd.Flags().StringVar(&stepConfig.UseFieldsOfAddonDescriptor, "useFieldsOfAddonDescriptor", os.Getenv("PIPER_useFieldsOfAddonDescriptor"), "use fields of the addonDescriptor in the cpe as input values. Please enter in the format '[{\"use\":\"Name\",\"renameTo\":\"SWC\"}]'") 203 cmd.Flags().StringVar(&stepConfig.ConditionOnAddonDescriptor, "conditionOnAddonDescriptor", os.Getenv("PIPER_conditionOnAddonDescriptor"), "normally if useFieldsOfAddonDescriptor is not initial, a build is triggered for each repository in the addonDescriptor. This can be changed by posing conditions. Please enter in the format '[{\"field\":\"Status\",\"operator\":\"==\",\"value\":\"P\"}]'") 204 cmd.Flags().BoolVar(&stepConfig.StopOnFirstError, "stopOnFirstError", false, "If false, it does not stop if an error occured for one repository in the addonDescriptor, but continues with the next repository. However the step is marked as failed in the end if an error occured.") 205 cmd.Flags().StringVar(&stepConfig.AddonDescriptor, "addonDescriptor", os.Getenv("PIPER_addonDescriptor"), "Structure in the commonPipelineEnvironment containing information about the Product Version and corresponding Software Component Versions") 206 207 cmd.MarkFlagRequired("username") 208 cmd.MarkFlagRequired("password") 209 cmd.MarkFlagRequired("phase") 210 cmd.MarkFlagRequired("downloadAllResultFiles") 211 cmd.MarkFlagRequired("publishAllDownloadedResultFiles") 212 cmd.MarkFlagRequired("treatWarningsAsError") 213 cmd.MarkFlagRequired("maxRuntimeInMinutes") 214 cmd.MarkFlagRequired("pollingIntervalInSeconds") 215 } 216 217 // retrieve step metadata 218 func abapEnvironmentBuildMetadata() config.StepData { 219 var theMetaData = config.StepData{ 220 Metadata: config.StepMetadata{ 221 Name: "abapEnvironmentBuild", 222 Aliases: []config.Alias{}, 223 Description: "Executes builds as defined with the build framework", 224 }, 225 Spec: config.StepSpec{ 226 Inputs: config.StepInputs{ 227 Secrets: []config.StepSecrets{ 228 {Name: "abapCredentialsId", Description: "Jenkins credentials ID containing user and password to authenticate to the Cloud Platform ABAP Environment system or the Cloud Foundry API", Type: "jenkins", Aliases: []config.Alias{{Name: "cfCredentialsId", Deprecated: false}, {Name: "credentialsId", Deprecated: false}}}, 229 }, 230 Parameters: []config.StepParameters{ 231 { 232 Name: "cfApiEndpoint", 233 ResourceRef: []config.ResourceReference{}, 234 Scope: []string{"PARAMETERS", "STAGES", "STEPS", "GENERAL"}, 235 Type: "string", 236 Mandatory: false, 237 Aliases: []config.Alias{{Name: "cloudFoundry/apiEndpoint"}}, 238 Default: os.Getenv("PIPER_cfApiEndpoint"), 239 }, 240 { 241 Name: "cfOrg", 242 ResourceRef: []config.ResourceReference{}, 243 Scope: []string{"PARAMETERS", "STAGES", "STEPS", "GENERAL"}, 244 Type: "string", 245 Mandatory: false, 246 Aliases: []config.Alias{{Name: "cloudFoundry/org"}}, 247 Default: os.Getenv("PIPER_cfOrg"), 248 }, 249 { 250 Name: "cfSpace", 251 ResourceRef: []config.ResourceReference{}, 252 Scope: []string{"PARAMETERS", "STAGES", "STEPS", "GENERAL"}, 253 Type: "string", 254 Mandatory: false, 255 Aliases: []config.Alias{{Name: "cloudFoundry/space"}}, 256 Default: os.Getenv("PIPER_cfSpace"), 257 }, 258 { 259 Name: "cfServiceInstance", 260 ResourceRef: []config.ResourceReference{}, 261 Scope: []string{"PARAMETERS", "STAGES", "STEPS", "GENERAL"}, 262 Type: "string", 263 Mandatory: false, 264 Aliases: []config.Alias{{Name: "cloudFoundry/serviceInstance"}}, 265 Default: os.Getenv("PIPER_cfServiceInstance"), 266 }, 267 { 268 Name: "cfServiceKeyName", 269 ResourceRef: []config.ResourceReference{}, 270 Scope: []string{"PARAMETERS", "STAGES", "STEPS", "GENERAL"}, 271 Type: "string", 272 Mandatory: false, 273 Aliases: []config.Alias{{Name: "cloudFoundry/serviceKey"}, {Name: "cloudFoundry/serviceKeyName"}, {Name: "cfServiceKey"}}, 274 Default: os.Getenv("PIPER_cfServiceKeyName"), 275 }, 276 { 277 Name: "host", 278 ResourceRef: []config.ResourceReference{}, 279 Scope: []string{"PARAMETERS", "STAGES", "STEPS", "GENERAL"}, 280 Type: "string", 281 Mandatory: false, 282 Aliases: []config.Alias{}, 283 Default: os.Getenv("PIPER_host"), 284 }, 285 { 286 Name: "abapSourceClient", 287 ResourceRef: []config.ResourceReference{}, 288 Scope: []string{"PARAMETERS", "STAGES", "STEPS", "GENERAL"}, 289 Type: "string", 290 Mandatory: false, 291 Aliases: []config.Alias{}, 292 Default: os.Getenv("PIPER_abapSourceClient"), 293 }, 294 { 295 Name: "username", 296 ResourceRef: []config.ResourceReference{}, 297 Scope: []string{"PARAMETERS", "STAGES", "STEPS"}, 298 Type: "string", 299 Mandatory: true, 300 Aliases: []config.Alias{}, 301 Default: os.Getenv("PIPER_username"), 302 }, 303 { 304 Name: "password", 305 ResourceRef: []config.ResourceReference{}, 306 Scope: []string{"PARAMETERS", "STAGES", "STEPS"}, 307 Type: "string", 308 Mandatory: true, 309 Aliases: []config.Alias{}, 310 Default: os.Getenv("PIPER_password"), 311 }, 312 { 313 Name: "phase", 314 ResourceRef: []config.ResourceReference{}, 315 Scope: []string{"PARAMETERS", "STAGES", "STEPS"}, 316 Type: "string", 317 Mandatory: true, 318 Aliases: []config.Alias{}, 319 Default: os.Getenv("PIPER_phase"), 320 }, 321 { 322 Name: "values", 323 ResourceRef: []config.ResourceReference{}, 324 Scope: []string{"PARAMETERS", "STAGES", "STEPS"}, 325 Type: "string", 326 Mandatory: false, 327 Aliases: []config.Alias{}, 328 Default: os.Getenv("PIPER_values"), 329 }, 330 { 331 Name: "downloadAllResultFiles", 332 ResourceRef: []config.ResourceReference{}, 333 Scope: []string{"PARAMETERS", "STAGES", "STEPS"}, 334 Type: "bool", 335 Mandatory: true, 336 Aliases: []config.Alias{}, 337 Default: false, 338 }, 339 { 340 Name: "downloadResultFilenames", 341 ResourceRef: []config.ResourceReference{}, 342 Scope: []string{"PARAMETERS", "STAGES", "STEPS"}, 343 Type: "[]string", 344 Mandatory: false, 345 Aliases: []config.Alias{}, 346 Default: []string{}, 347 }, 348 { 349 Name: "publishAllDownloadedResultFiles", 350 ResourceRef: []config.ResourceReference{}, 351 Scope: []string{"PARAMETERS", "STAGES", "STEPS"}, 352 Type: "bool", 353 Mandatory: true, 354 Aliases: []config.Alias{}, 355 Default: false, 356 }, 357 { 358 Name: "publishResultFilenames", 359 ResourceRef: []config.ResourceReference{}, 360 Scope: []string{"PARAMETERS", "STAGES", "STEPS"}, 361 Type: "[]string", 362 Mandatory: false, 363 Aliases: []config.Alias{}, 364 Default: []string{}, 365 }, 366 { 367 Name: "subDirectoryForDownload", 368 ResourceRef: []config.ResourceReference{}, 369 Scope: []string{"PARAMETERS", "STAGES", "STEPS", "GENERAL"}, 370 Type: "string", 371 Mandatory: false, 372 Aliases: []config.Alias{}, 373 Default: os.Getenv("PIPER_subDirectoryForDownload"), 374 }, 375 { 376 Name: "filenamePrefixForDownload", 377 ResourceRef: []config.ResourceReference{}, 378 Scope: []string{"PARAMETERS", "STAGES", "STEPS", "GENERAL"}, 379 Type: "string", 380 Mandatory: false, 381 Aliases: []config.Alias{}, 382 Default: os.Getenv("PIPER_filenamePrefixForDownload"), 383 }, 384 { 385 Name: "treatWarningsAsError", 386 ResourceRef: []config.ResourceReference{}, 387 Scope: []string{"PARAMETERS", "STAGES", "STEPS"}, 388 Type: "bool", 389 Mandatory: true, 390 Aliases: []config.Alias{}, 391 Default: false, 392 }, 393 { 394 Name: "maxRuntimeInMinutes", 395 ResourceRef: []config.ResourceReference{}, 396 Scope: []string{"PARAMETERS", "STAGES", "STEPS"}, 397 Type: "int", 398 Mandatory: true, 399 Aliases: []config.Alias{}, 400 Default: 360, 401 }, 402 { 403 Name: "pollingIntervalInSeconds", 404 ResourceRef: []config.ResourceReference{}, 405 Scope: []string{"PARAMETERS", "STAGES", "STEPS"}, 406 Type: "int", 407 Mandatory: true, 408 Aliases: []config.Alias{}, 409 Default: 60, 410 }, 411 { 412 Name: "certificateNames", 413 ResourceRef: []config.ResourceReference{}, 414 Scope: []string{"PARAMETERS", "STAGES", "STEPS", "GENERAL"}, 415 Type: "[]string", 416 Mandatory: false, 417 Aliases: []config.Alias{}, 418 Default: []string{}, 419 }, 420 { 421 Name: "cpeValues", 422 ResourceRef: []config.ResourceReference{ 423 { 424 Name: "commonPipelineEnvironment", 425 Param: "abap/buildValues", 426 }, 427 }, 428 Scope: []string{}, 429 Type: "string", 430 Mandatory: false, 431 Aliases: []config.Alias{}, 432 Default: os.Getenv("PIPER_cpeValues"), 433 }, 434 { 435 Name: "useFieldsOfAddonDescriptor", 436 ResourceRef: []config.ResourceReference{}, 437 Scope: []string{"PARAMETERS", "STAGES", "STEPS"}, 438 Type: "string", 439 Mandatory: false, 440 Aliases: []config.Alias{}, 441 Default: os.Getenv("PIPER_useFieldsOfAddonDescriptor"), 442 }, 443 { 444 Name: "conditionOnAddonDescriptor", 445 ResourceRef: []config.ResourceReference{}, 446 Scope: []string{"PARAMETERS", "STAGES", "STEPS"}, 447 Type: "string", 448 Mandatory: false, 449 Aliases: []config.Alias{}, 450 Default: os.Getenv("PIPER_conditionOnAddonDescriptor"), 451 }, 452 { 453 Name: "stopOnFirstError", 454 ResourceRef: []config.ResourceReference{}, 455 Scope: []string{"PARAMETERS", "STAGES", "STEPS"}, 456 Type: "bool", 457 Mandatory: false, 458 Aliases: []config.Alias{}, 459 Default: false, 460 }, 461 { 462 Name: "addonDescriptor", 463 ResourceRef: []config.ResourceReference{ 464 { 465 Name: "commonPipelineEnvironment", 466 Param: "abap/addonDescriptor", 467 }, 468 }, 469 Scope: []string{"PARAMETERS", "STAGES", "STEPS"}, 470 Type: "string", 471 Mandatory: false, 472 Aliases: []config.Alias{}, 473 Default: os.Getenv("PIPER_addonDescriptor"), 474 }, 475 }, 476 }, 477 Containers: []config.Container{ 478 {Name: "cf", Image: "ppiper/cf-cli:v12"}, 479 }, 480 Outputs: config.StepOutputs{ 481 Resources: []config.StepResources{ 482 { 483 Name: "commonPipelineEnvironment", 484 Type: "piperEnvironment", 485 Parameters: []map[string]interface{}{ 486 {"name": "abap/buildValues"}, 487 }, 488 }, 489 }, 490 }, 491 }, 492 } 493 return theMetaData 494 }