log.Entry().Error("failed to persist Influx environment")
}
}
// TmsExportCommand This step allows you to export an MTA file (multi-target application archive) and multiple MTA extension descriptors into a TMS (SAP Cloud Transport Management service) landscape for further TMS-controlled distribution through a TMS-configured landscape.
funcTmsExportCommand()*cobra.Command{
constSTEP_NAME="tmsExport"
metadata:=tmsExportMetadata()
varstepConfigtmsExportOptions
varstartTimetime.Time
varinfluxtmsExportInflux
varlogCollector*log.CollectorHook
varsplunkClient*splunk.Splunk
telemetryClient:=&telemetry.Telemetry{}
varcreateTmsExportCmd=&cobra.Command{
Use:STEP_NAME,
Short:"This step allows you to export an MTA file (multi-target application archive) and multiple MTA extension descriptors into a TMS (SAP Cloud Transport Management service) landscape for further TMS-controlled distribution through a TMS-configured landscape.",
*YouhavesubscribedtoandsetupTMS,asdescribedin[InitialSetup](https://help.sap.com/viewer/7f7160ec0d8546c6b3eab72fb5ad6fd8/Cloud/en-US/66fd7283c62f48adb23c56fb48c84a60.html), which includes the configuration of your transport landscape.
*Acorrespondingservicekeyhasbeencreated,asdescribedin[SetUptheEnvironmenttoTransportContentArchivesdirectlyinanApplication](https://help.sap.com/viewer/7f7160ec0d8546c6b3eab72fb5ad6fd8/Cloud/en-US/8d9490792ed14f1bbf8a6ac08a6bca64.html). This service key (JSON) must be stored as a secret text within the Jenkins secure store or provided as value of serviceKey parameter.`,
cmd.Flags().StringVar(&stepConfig.TmsServiceKey,"tmsServiceKey",os.Getenv("PIPER_tmsServiceKey"),"DEPRECATION WARNING: This parameter has been deprecated, please use the serviceKey parameter instead, which supports both service key for TMS (SAP Cloud Transport Management service), as well as service key for CALM (SAP Cloud Application Lifecycle Management) service.\nService key JSON string to access the SAP Cloud Transport Management service instance APIs.\n")
cmd.Flags().StringVar(&stepConfig.ServiceKey,"serviceKey",os.Getenv("PIPER_serviceKey"),"Service key JSON string to access TMS (SAP Cloud Transport Management service) instance APIs. This can be a service key for TMS, or a service key for CALM (SAP Cloud Application Lifecycle Management) service. If not specified and if pipeline is running on Jenkins, service key, stored under ID provided with credentialsId parameter, is used.\n")
cmd.Flags().StringVar(&stepConfig.CustomDescription,"customDescription",os.Getenv("PIPER_customDescription"),"Can be used as the description of a transport request. Will overwrite the default, which is corresponding Git commit ID.")
cmd.Flags().StringVar(&stepConfig.NamedUser,"namedUser",`Piper-Pipeline`,"Defines the named user to execute transport request with. The default value is 'Piper-Pipeline'. If pipeline is running on Jenkins, the name of the user, who started the job, is tried to be used at first.")
cmd.Flags().StringVar(&stepConfig.NodeName,"nodeName",os.Getenv("PIPER_nodeName"),"Defines the name of the export node - starting node in TMS landscape. The transport request is added to the queues of the follow-on nodes of export node.")
cmd.Flags().StringVar(&stepConfig.MtaPath,"mtaPath",os.Getenv("PIPER_mtaPath"),"Defines the relative path to *.mtar file for the export to the SAP Cloud Transport Management service. If not specified, it will use the *.mtar file created in mtaBuild.")
cmd.Flags().StringVar(&stepConfig.MtaVersion,"mtaVersion",`*`,"Defines the version of the MTA for which the MTA extension descriptor will be used. You can use an asterisk (*) to accept any MTA version, or use a specific version compliant with SemVer 2.0, e.g. 1.0.0 (see semver.org). If the parameter is not configured, an asterisk is used.")
cmd.Flags().StringVar(&stepConfig.Proxy,"proxy",os.Getenv("PIPER_proxy"),"Proxy URL which should be used for communication with the SAP Cloud Transport Management service backend.")
Description:"This step allows you to export an MTA file (multi-target application archive) and multiple MTA extension descriptors into a TMS (SAP Cloud Transport Management service) landscape for further TMS-controlled distribution through a TMS-configured landscape.",
{Name:"credentialsId",Description:"Jenkins 'Secret text' credentials ID containing service key for TMS (SAP Cloud Transport Management service) or CALM (SAP Cloud Application Lifecycle Management) service.",Type:"jenkins"},