1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-10-30 23:57:50 +02:00

CPI- Remove platform parameter (#2956)

* Remove platform from yaml and generated

* Remove from tests and md
This commit is contained in:
Linda Siebert
2021-06-30 14:32:30 +02:00
committed by GitHub
parent 54f2a0d471
commit b68f549923
15 changed files with 0 additions and 89 deletions

View File

@@ -18,7 +18,6 @@ type integrationArtifactDeployOptions struct {
APIServiceKey string `json:"apiServiceKey,omitempty"`
IntegrationFlowID string `json:"integrationFlowId,omitempty"`
IntegrationFlowVersion string `json:"integrationFlowVersion,omitempty"`
Platform string `json:"platform,omitempty"`
}
// IntegrationArtifactDeployCommand Deploy a CPI integration flow
@@ -98,7 +97,6 @@ func addIntegrationArtifactDeployFlags(cmd *cobra.Command, stepConfig *integrati
cmd.Flags().StringVar(&stepConfig.APIServiceKey, "apiServiceKey", os.Getenv("PIPER_apiServiceKey"), "Service key JSON string to access the Cloud Integration API")
cmd.Flags().StringVar(&stepConfig.IntegrationFlowID, "integrationFlowId", os.Getenv("PIPER_integrationFlowId"), "Specifies the ID of the Integration Flow artifact")
cmd.Flags().StringVar(&stepConfig.IntegrationFlowVersion, "integrationFlowVersion", os.Getenv("PIPER_integrationFlowVersion"), "Specifies the version of the Integration Flow artifact")
cmd.Flags().StringVar(&stepConfig.Platform, "platform", os.Getenv("PIPER_platform"), "Specifies the running platform of the SAP Cloud platform integraion service")
cmd.MarkFlagRequired("apiServiceKey")
cmd.MarkFlagRequired("integrationFlowId")
@@ -152,15 +150,6 @@ func integrationArtifactDeployMetadata() config.StepData {
Aliases: []config.Alias{},
Default: os.Getenv("PIPER_integrationFlowVersion"),
},
{
Name: "platform",
ResourceRef: []config.ResourceReference{},
Scope: []string{"PARAMETERS", "STAGES", "STEPS"},
Type: "string",
Mandatory: false,
Aliases: []config.Alias{},
Default: os.Getenv("PIPER_platform"),
},
},
},
},

View File

@@ -42,7 +42,6 @@ func TestRunIntegrationArtifactDeploy(t *testing.T) {
APIServiceKey: apiServiceKey,
IntegrationFlowID: "flow1",
IntegrationFlowVersion: "1.0.1",
Platform: "cf",
}
httpClient := httpMockCpis{CPIFunction: "", ResponseBody: ``, TestType: "PositiveAndDeployIntegrationDesigntimeArtifactResBody"}
@@ -76,7 +75,6 @@ func TestRunIntegrationArtifactDeploy(t *testing.T) {
APIServiceKey: apiServiceKey,
IntegrationFlowID: "flow1",
IntegrationFlowVersion: "1.0.1",
Platform: "cf",
}
httpClient := httpMockCpis{CPIFunction: "FailIntegrationDesigntimeArtifactDeployment", ResponseBody: ``, TestType: "Negative"}
@@ -110,7 +108,6 @@ func TestRunIntegrationArtifactDeploy(t *testing.T) {
APIServiceKey: apiServiceKey,
IntegrationFlowID: "flow1",
IntegrationFlowVersion: "1.0.1",
Platform: "cf",
}
httpClient := httpMockCpis{CPIFunction: "", ResponseBody: ``, TestType: "NegativeAndDeployIntegrationDesigntimeArtifactResBody"}
@@ -136,7 +133,6 @@ func TestRunIntegrationArtifactDeploy(t *testing.T) {
APIServiceKey: apiServiceKey,
IntegrationFlowID: "flow1",
IntegrationFlowVersion: "1.0.1",
Platform: "cf",
}
httpClient := httpMockCpis{CPIFunction: "GetIntegrationArtifactDeployStatus", Options: clientOptions, ResponseBody: ``, TestType: "PositiveAndDeployIntegrationDesigntimeArtifactResBody"}
@@ -164,7 +160,6 @@ func TestRunIntegrationArtifactDeploy(t *testing.T) {
APIServiceKey: apiServiceKey,
IntegrationFlowID: "flow1",
IntegrationFlowVersion: "1.0.1",
Platform: "cf",
}
httpClient := httpMockCpis{CPIFunction: "GetIntegrationArtifactDeployErrorDetails", Options: clientOptions, ResponseBody: ``, TestType: "PositiveAndGetDeployedIntegrationDesigntimeArtifactErrorResBody"}

View File

@@ -19,7 +19,6 @@ import (
type integrationArtifactGetMplStatusOptions struct {
APIServiceKey string `json:"apiServiceKey,omitempty"`
IntegrationFlowID string `json:"integrationFlowId,omitempty"`
Platform string `json:"platform,omitempty"`
}
type integrationArtifactGetMplStatusCommonPipelineEnvironment struct {
@@ -128,7 +127,6 @@ func IntegrationArtifactGetMplStatusCommand() *cobra.Command {
func addIntegrationArtifactGetMplStatusFlags(cmd *cobra.Command, stepConfig *integrationArtifactGetMplStatusOptions) {
cmd.Flags().StringVar(&stepConfig.APIServiceKey, "apiServiceKey", os.Getenv("PIPER_apiServiceKey"), "Service key JSON string to access the Cloud Integration API")
cmd.Flags().StringVar(&stepConfig.IntegrationFlowID, "integrationFlowId", os.Getenv("PIPER_integrationFlowId"), "Specifies the ID of the Integration Flow artifact")
cmd.Flags().StringVar(&stepConfig.Platform, "platform", os.Getenv("PIPER_platform"), "Specifies the running platform of the SAP Cloud platform integraion service")
cmd.MarkFlagRequired("apiServiceKey")
cmd.MarkFlagRequired("integrationFlowId")
@@ -172,15 +170,6 @@ func integrationArtifactGetMplStatusMetadata() config.StepData {
Aliases: []config.Alias{},
Default: os.Getenv("PIPER_integrationFlowId"),
},
{
Name: "platform",
ResourceRef: []config.ResourceReference{},
Scope: []string{"PARAMETERS", "STAGES", "STEPS"},
Type: "string",
Mandatory: false,
Aliases: []config.Alias{},
Default: os.Getenv("PIPER_platform"),
},
},
},
Outputs: config.StepOutputs{

View File

@@ -35,7 +35,6 @@ func TestRunIntegrationArtifactGetMplStatus(t *testing.T) {
config := integrationArtifactGetMplStatusOptions{
APIServiceKey: apiServiceKey,
IntegrationFlowID: "flow1",
Platform: "cf",
}
httpClient := httpMockCpis{CPIFunction: "IntegrationArtifactGetMplStatus", ResponseBody: ``, TestType: "Positive"}
@@ -68,7 +67,6 @@ func TestRunIntegrationArtifactGetMplStatus(t *testing.T) {
config := integrationArtifactGetMplStatusOptions{
APIServiceKey: apiServiceKey,
IntegrationFlowID: "flow1",
Platform: "cf",
}
httpClient := httpMockCpis{CPIFunction: "IntegrationArtifactGetMplStatus", ResponseBody: ``, TestType: "Negative"}

View File

@@ -19,7 +19,6 @@ import (
type integrationArtifactGetServiceEndpointOptions struct {
APIServiceKey string `json:"apiServiceKey,omitempty"`
IntegrationFlowID string `json:"integrationFlowId,omitempty"`
Platform string `json:"platform,omitempty"`
}
type integrationArtifactGetServiceEndpointCommonPipelineEnvironment struct {
@@ -128,7 +127,6 @@ func IntegrationArtifactGetServiceEndpointCommand() *cobra.Command {
func addIntegrationArtifactGetServiceEndpointFlags(cmd *cobra.Command, stepConfig *integrationArtifactGetServiceEndpointOptions) {
cmd.Flags().StringVar(&stepConfig.APIServiceKey, "apiServiceKey", os.Getenv("PIPER_apiServiceKey"), "Service key JSON string to access the Cloud Integration API")
cmd.Flags().StringVar(&stepConfig.IntegrationFlowID, "integrationFlowId", os.Getenv("PIPER_integrationFlowId"), "Specifies the ID of the Integration Flow artifact")
cmd.Flags().StringVar(&stepConfig.Platform, "platform", os.Getenv("PIPER_platform"), "Specifies the running platform of the SAP Cloud platform integraion service")
cmd.MarkFlagRequired("apiServiceKey")
cmd.MarkFlagRequired("integrationFlowId")
@@ -172,15 +170,6 @@ func integrationArtifactGetServiceEndpointMetadata() config.StepData {
Aliases: []config.Alias{},
Default: os.Getenv("PIPER_integrationFlowId"),
},
{
Name: "platform",
ResourceRef: []config.ResourceReference{},
Scope: []string{"PARAMETERS", "STAGES", "STEPS"},
Type: "string",
Mandatory: false,
Aliases: []config.Alias{},
Default: os.Getenv("PIPER_platform"),
},
},
},
Outputs: config.StepOutputs{

View File

@@ -35,7 +35,6 @@ func TestRunIntegrationArtifactGetServiceEndpoint(t *testing.T) {
config := integrationArtifactGetServiceEndpointOptions{
APIServiceKey: apiServiceKey,
IntegrationFlowID: "CPI_IFlow_Call_using_Cert",
Platform: "cf",
}
httpClient := httpMockCpis{CPIFunction: "IntegrationArtifactGetServiceEndpoint", ResponseBody: ``, TestType: "PositiveAndGetetIntegrationArtifactGetServiceResBody"}
@@ -68,7 +67,6 @@ func TestRunIntegrationArtifactGetServiceEndpoint(t *testing.T) {
config := integrationArtifactGetServiceEndpointOptions{
APIServiceKey: apiServiceKey,
IntegrationFlowID: "CPI_IFlow_Call_using_Cert",
Platform: "cf",
}
httpClient := httpMockCpis{CPIFunction: "IntegrationArtifactGetServiceEndpoint", ResponseBody: ``, TestType: "Negative"}

View File

@@ -18,7 +18,6 @@ type integrationArtifactUpdateConfigurationOptions struct {
APIServiceKey string `json:"apiServiceKey,omitempty"`
IntegrationFlowID string `json:"integrationFlowId,omitempty"`
IntegrationFlowVersion string `json:"integrationFlowVersion,omitempty"`
Platform string `json:"platform,omitempty"`
ParameterKey string `json:"parameterKey,omitempty"`
ParameterValue string `json:"parameterValue,omitempty"`
}
@@ -100,7 +99,6 @@ func addIntegrationArtifactUpdateConfigurationFlags(cmd *cobra.Command, stepConf
cmd.Flags().StringVar(&stepConfig.APIServiceKey, "apiServiceKey", os.Getenv("PIPER_apiServiceKey"), "Service key JSON string to access the Cloud Integration API")
cmd.Flags().StringVar(&stepConfig.IntegrationFlowID, "integrationFlowId", os.Getenv("PIPER_integrationFlowId"), "Specifies the ID of the Integration Flow artifact")
cmd.Flags().StringVar(&stepConfig.IntegrationFlowVersion, "integrationFlowVersion", os.Getenv("PIPER_integrationFlowVersion"), "Specifies the version of the Integration Flow artifact")
cmd.Flags().StringVar(&stepConfig.Platform, "platform", os.Getenv("PIPER_platform"), "Specifies the running platform of the SAP Cloud platform integraion service")
cmd.Flags().StringVar(&stepConfig.ParameterKey, "parameterKey", os.Getenv("PIPER_parameterKey"), "Specifies the externalized parameter name.")
cmd.Flags().StringVar(&stepConfig.ParameterValue, "parameterValue", os.Getenv("PIPER_parameterValue"), "Specifies the externalized parameter value.")
@@ -158,15 +156,6 @@ func integrationArtifactUpdateConfigurationMetadata() config.StepData {
Aliases: []config.Alias{},
Default: os.Getenv("PIPER_integrationFlowVersion"),
},
{
Name: "platform",
ResourceRef: []config.ResourceReference{},
Scope: []string{"PARAMETERS", "STAGES", "STEPS"},
Type: "string",
Mandatory: false,
Aliases: []config.Alias{},
Default: os.Getenv("PIPER_platform"),
},
{
Name: "parameterKey",
ResourceRef: []config.ResourceReference{},

View File

@@ -27,5 +27,4 @@ steps:
cpiApiServiceKeyCredentialsId: 'MY_API_SERVICE_KEY'
integrationFlowId: 'MY_INTEGRATION_FLOW_NAME'
integrationFlowVersion: 'MY_INTEGRATION_FLOW_VERSION'
platform: cf
```

View File

@@ -26,5 +26,4 @@ steps:
integrationArtifactGetServiceEndpoint:
cpiApiServiceKeyCredentialsId: 'MY_API_SERVICE_KEY'
integrationFlowId: 'MY_INTEGRATION_FLOW_ID'
platform: cf
```

View File

@@ -26,5 +26,4 @@ steps:
integrationFlowId: 'INTEGRATION_FLOW_ID'
contentType: 'text/plain'
messageBodyPath: 'myIntegrationsTest/testBody'
platform: cf
```

View File

@@ -27,7 +27,6 @@ steps:
cpiApiServiceKeyCredentialsId: 'MY_API_SERVICE_KEY'
integrationFlowId: 'MY_INTEGRATION_FLOW_NAME'
integrationFlowVersion: 'MY_INTEGRATION_FLOW_VERSION'
platform: 'cf'
parameterKey: 'MY_INTEGRATION_FLOW_CONFIG_PARAMETER_NAME'
parameterValue: 'MY_INTEGRATION_FLOW_CONFIG_PARAMETER_VALUE'
```

View File

@@ -40,11 +40,3 @@ spec:
- STAGES
- STEPS
mandatory: true
- name: platform
type: string
description: Specifies the running platform of the SAP Cloud platform integraion service
scope:
- PARAMETERS
- STAGES
- STEPS
mandatory: false

View File

@@ -31,14 +31,6 @@ spec:
- STAGES
- STEPS
mandatory: true
- name: platform
type: string
description: Specifies the running platform of the SAP Cloud platform integraion service
scope:
- PARAMETERS
- STAGES
- STEPS
mandatory: false
outputs:
resources:
- name: commonPipelineEnvironment

View File

@@ -31,14 +31,6 @@ spec:
- STAGES
- STEPS
mandatory: true
- name: platform
type: string
description: Specifies the running platform of the SAP Cloud platform integraion service
scope:
- PARAMETERS
- STAGES
- STEPS
mandatory: false
outputs:
resources:
- name: commonPipelineEnvironment

View File

@@ -40,14 +40,6 @@ spec:
- STAGES
- STEPS
mandatory: true
- name: platform
type: string
description: Specifies the running platform of the SAP Cloud platform integraion service
scope:
- PARAMETERS
- STAGES
- STEPS
mandatory: false
- name: parameterKey
type: string
description: Specifies the externalized parameter name.