From 8eeba2d0055a7c645a60de0466d1ed21194b0c70 Mon Sep 17 00:00:00 2001 From: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:51:22 +0200 Subject: [PATCH] [ABAP] Migrate SAP_COM_0510 to SAP_COM_0948 (#4925) * Migrate SAP_COM_0510 to SAP_COM_0948 * Update error message * Update error message * Fix error message in unit test * Update unit tests --- cmd/abapEnvironmentCheckoutBranch_generated.go | 8 ++++---- cmd/abapEnvironmentCloneGitRepo_generated.go | 8 ++++---- cmd/abapEnvironmentCreateTag_generated.go | 8 ++++---- cmd/abapEnvironmentPullGitRepo_generated.go | 8 ++++---- cmd/abapEnvironmentRunATCCheck_test.go | 4 ++-- .../docs/pipelines/abapEnvironment/stages/build.md | 2 +- .../pipelines/abapEnvironment/stages/cloneRepositories.md | 2 +- documentation/docs/steps/abapEnvironmentCheckoutBranch.md | 2 +- documentation/docs/steps/abapEnvironmentCloneGitRepo.md | 2 +- documentation/docs/steps/abapEnvironmentCreateTag.md | 2 +- documentation/docs/steps/abapEnvironmentPullGitRepo.md | 2 +- pkg/abaputils/abaputils.go | 2 +- pkg/abaputils/abaputils_test.go | 2 +- .../pipeline/abapEnvironmentPipelineDefaults.yml | 5 ++--- resources/metadata/abapEnvironmentCheckoutBranch.yaml | 8 ++++---- resources/metadata/abapEnvironmentCloneGitRepo.yaml | 8 ++++---- resources/metadata/abapEnvironmentCreateTag.yaml | 8 ++++---- resources/metadata/abapEnvironmentPullGitRepo.yaml | 8 ++++---- 18 files changed, 44 insertions(+), 45 deletions(-) diff --git a/cmd/abapEnvironmentCheckoutBranch_generated.go b/cmd/abapEnvironmentCheckoutBranch_generated.go index 4939e41a0a..988ebfc9d4 100644 --- a/cmd/abapEnvironmentCheckoutBranch_generated.go +++ b/cmd/abapEnvironmentCheckoutBranch_generated.go @@ -47,8 +47,8 @@ func AbapEnvironmentCheckoutBranchCommand() *cobra.Command { Long: `This step switches between branches of a git repository (Software Component) on a SAP BTP ABAP Environment system. Please provide either of the following options: -* The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0510](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/b04a9ae412894725a2fc539bfb1ca055.html). -* The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0510. +* The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0948](https://help.sap.com/docs/sap-btp-abap-environment/abap-environment/api-for-managing-software-components-61f4d47af1394b1c8ad684b71d3ad6a0?locale=en-US). +* The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0948. * Only provide one of those options with the respective credentials. If all values are provided, the direct communication (via host) has priority.`, PreRunE: func(cmd *cobra.Command, _ []string) error { startTime = time.Now() @@ -136,8 +136,8 @@ Please provide either of the following options: } func addAbapEnvironmentCheckoutBranchFlags(cmd *cobra.Command, stepConfig *abapEnvironmentCheckoutBranchOptions) { - cmd.Flags().StringVar(&stepConfig.Username, "username", os.Getenv("PIPER_username"), "User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510") - cmd.Flags().StringVar(&stepConfig.Password, "password", os.Getenv("PIPER_password"), "Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510") + cmd.Flags().StringVar(&stepConfig.Username, "username", os.Getenv("PIPER_username"), "User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948") + cmd.Flags().StringVar(&stepConfig.Password, "password", os.Getenv("PIPER_password"), "Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948") cmd.Flags().StringVar(&stepConfig.RepositoryName, "repositoryName", os.Getenv("PIPER_repositoryName"), "Specifies a Repository (Software Component) on the SAP BTP ABAP Environment system") cmd.Flags().StringVar(&stepConfig.BranchName, "branchName", os.Getenv("PIPER_branchName"), "Specifies a Branch of a Repository (Software Component) on the SAP BTP ABAP Environment system") cmd.Flags().StringVar(&stepConfig.Host, "host", os.Getenv("PIPER_host"), "Specifies the host address of the SAP BTP ABAP Environment system") diff --git a/cmd/abapEnvironmentCloneGitRepo_generated.go b/cmd/abapEnvironmentCloneGitRepo_generated.go index 8f37662939..9cba6305e5 100644 --- a/cmd/abapEnvironmentCloneGitRepo_generated.go +++ b/cmd/abapEnvironmentCloneGitRepo_generated.go @@ -47,8 +47,8 @@ func AbapEnvironmentCloneGitRepoCommand() *cobra.Command { Long: `Clones a git repository (Software Component) to a SAP BTP ABAP Environment system. If the repository is already cloned, the step will checkout the configured branch and pull the specified commit, instead. Please provide either of the following options: -* The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0510](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/b04a9ae412894725a2fc539bfb1ca055.html). -* The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0510. +* The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0948](https://help.sap.com/docs/sap-btp-abap-environment/abap-environment/api-for-managing-software-components-61f4d47af1394b1c8ad684b71d3ad6a0?locale=en-US). +* The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0948. * Only provide one of those options with the respective credentials. If all values are provided, the direct communication (via host) has priority.`, PreRunE: func(cmd *cobra.Command, _ []string) error { startTime = time.Now() @@ -136,8 +136,8 @@ Please provide either of the following options: } func addAbapEnvironmentCloneGitRepoFlags(cmd *cobra.Command, stepConfig *abapEnvironmentCloneGitRepoOptions) { - cmd.Flags().StringVar(&stepConfig.Username, "username", os.Getenv("PIPER_username"), "User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510") - cmd.Flags().StringVar(&stepConfig.Password, "password", os.Getenv("PIPER_password"), "Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510") + cmd.Flags().StringVar(&stepConfig.Username, "username", os.Getenv("PIPER_username"), "User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948") + cmd.Flags().StringVar(&stepConfig.Password, "password", os.Getenv("PIPER_password"), "Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948") cmd.Flags().StringVar(&stepConfig.Repositories, "repositories", os.Getenv("PIPER_repositories"), "Specifies a YAML file containing the repositories configuration") cmd.Flags().StringVar(&stepConfig.RepositoryName, "repositoryName", os.Getenv("PIPER_repositoryName"), "Specifies a repository (Software Components) on the SAP BTP ABAP Environment system") cmd.Flags().StringVar(&stepConfig.BranchName, "branchName", os.Getenv("PIPER_branchName"), "Specifies a branch of a repository (Software Components) on the SAP BTP ABAP Environment system") diff --git a/cmd/abapEnvironmentCreateTag_generated.go b/cmd/abapEnvironmentCreateTag_generated.go index 86886f8a72..02b47ef577 100644 --- a/cmd/abapEnvironmentCreateTag_generated.go +++ b/cmd/abapEnvironmentCreateTag_generated.go @@ -51,8 +51,8 @@ func AbapEnvironmentCreateTagCommand() *cobra.Command { Long: `Creates tags for specific commits of one or multiple repositories / software components. The tag can be specified explicitly as well as being generated by an addon product version or an addon component version. Please provide either of the following options: -* The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0510](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/b04a9ae412894725a2fc539bfb1ca055.html). -* The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0510. +* The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0948](https://help.sap.com/docs/sap-btp-abap-environment/abap-environment/api-for-managing-software-components-61f4d47af1394b1c8ad684b71d3ad6a0?locale=en-US). +* The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0948. * Only provide one of those options with the respective credentials. If all values are provided, the direct communication (via host) has priority.`, PreRunE: func(cmd *cobra.Command, _ []string) error { startTime = time.Now() @@ -140,8 +140,8 @@ Please provide either of the following options: } func addAbapEnvironmentCreateTagFlags(cmd *cobra.Command, stepConfig *abapEnvironmentCreateTagOptions) { - cmd.Flags().StringVar(&stepConfig.Username, "username", os.Getenv("PIPER_username"), "User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510") - cmd.Flags().StringVar(&stepConfig.Password, "password", os.Getenv("PIPER_password"), "Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510") + cmd.Flags().StringVar(&stepConfig.Username, "username", os.Getenv("PIPER_username"), "User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948") + cmd.Flags().StringVar(&stepConfig.Password, "password", os.Getenv("PIPER_password"), "Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948") cmd.Flags().StringVar(&stepConfig.Repositories, "repositories", os.Getenv("PIPER_repositories"), "Specifies a YAML file containing the repositories configuration") cmd.Flags().StringVar(&stepConfig.RepositoryName, "repositoryName", os.Getenv("PIPER_repositoryName"), "Specifies a repository (Software Components) on the SAP BTP ABAP Environment system") cmd.Flags().StringVar(&stepConfig.CommitID, "commitID", os.Getenv("PIPER_commitID"), "Specifies a commitID, for which a tag will be created") diff --git a/cmd/abapEnvironmentPullGitRepo_generated.go b/cmd/abapEnvironmentPullGitRepo_generated.go index 547deaec7a..3575ef4fb2 100644 --- a/cmd/abapEnvironmentPullGitRepo_generated.go +++ b/cmd/abapEnvironmentPullGitRepo_generated.go @@ -49,8 +49,8 @@ func AbapEnvironmentPullGitRepoCommand() *cobra.Command { Long: `Pulls a git repository (Software Component) to a SAP BTP ABAP Environment system. Please provide either of the following options: -* The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0510](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/b04a9ae412894725a2fc539bfb1ca055.html). -* The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0510. +* The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0948](https://help.sap.com/docs/sap-btp-abap-environment/abap-environment/api-for-managing-software-components-61f4d47af1394b1c8ad684b71d3ad6a0?locale=en-US). +* The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0948. * Only provide one of those options with the respective credentials. If all values are provided, the direct communication (via host) has priority.`, PreRunE: func(cmd *cobra.Command, _ []string) error { startTime = time.Now() @@ -138,8 +138,8 @@ Please provide either of the following options: } func addAbapEnvironmentPullGitRepoFlags(cmd *cobra.Command, stepConfig *abapEnvironmentPullGitRepoOptions) { - cmd.Flags().StringVar(&stepConfig.Username, "username", os.Getenv("PIPER_username"), "User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510") - cmd.Flags().StringVar(&stepConfig.Password, "password", os.Getenv("PIPER_password"), "Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510") + cmd.Flags().StringVar(&stepConfig.Username, "username", os.Getenv("PIPER_username"), "User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948") + cmd.Flags().StringVar(&stepConfig.Password, "password", os.Getenv("PIPER_password"), "Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948") cmd.Flags().StringSliceVar(&stepConfig.RepositoryNames, "repositoryNames", []string{}, "Specifies a list of Repositories (Software Components) on the SAP BTP ABAP Environment system") cmd.Flags().StringVar(&stepConfig.Repositories, "repositories", os.Getenv("PIPER_repositories"), "Specifies a YAML file containing the repositories configuration") cmd.Flags().StringVar(&stepConfig.RepositoryName, "repositoryName", os.Getenv("PIPER_repositoryName"), "Specifies a repository (Software Component) on the SAP BTP ABAP Environment system") diff --git a/cmd/abapEnvironmentRunATCCheck_test.go b/cmd/abapEnvironmentRunATCCheck_test.go index c39f64524c..ea607c5f32 100644 --- a/cmd/abapEnvironmentRunATCCheck_test.go +++ b/cmd/abapEnvironmentRunATCCheck_test.go @@ -58,10 +58,10 @@ func TestHostConfig(t *testing.T) { } _, err := autils.GetAbapCommunicationArrangementInfo(options.AbapEnvOptions, "") - assert.EqualError(t, err, "Parameters missing. Please provide EITHER the Host of the ABAP server OR the Cloud Foundry ApiEndpoint, Organization, Space, Service Instance and a corresponding Service Key for the Communication Scenario SAP_COM_0510") + assert.EqualError(t, err, "Parameters missing. Please provide EITHER the Host of the ABAP server OR the Cloud Foundry API Endpoint, Organization, Space, Service Instance and Service Key") _, err = autils.GetAbapCommunicationArrangementInfo(options.AbapEnvOptions, "") - assert.EqualError(t, err, "Parameters missing. Please provide EITHER the Host of the ABAP server OR the Cloud Foundry ApiEndpoint, Organization, Space, Service Instance and a corresponding Service Key for the Communication Scenario SAP_COM_0510") + assert.EqualError(t, err, "Parameters missing. Please provide EITHER the Host of the ABAP server OR the Cloud Foundry API Endpoint, Organization, Space, Service Instance and Service Key") }) t.Run("Check Host: CF Service Key", func(t *testing.T) { diff --git a/documentation/docs/pipelines/abapEnvironment/stages/build.md b/documentation/docs/pipelines/abapEnvironment/stages/build.md index b818efa2d4..8665598fac 100644 --- a/documentation/docs/pipelines/abapEnvironment/stages/build.md +++ b/documentation/docs/pipelines/abapEnvironment/stages/build.md @@ -35,7 +35,7 @@ general: cfSpace: 'mySpaceBld' cfCredentialsId: 'cfAuthentification' cfServiceInstance: 'bld_system' - cfServiceKeyName: 'JENKINS_SAP_COM_0510' + cfServiceKeyName: 'JENKINS_SAP_COM_0948' stages: Build: cfServiceKeyName: 'JENKINS_SAP_COM_0582' diff --git a/documentation/docs/pipelines/abapEnvironment/stages/cloneRepositories.md b/documentation/docs/pipelines/abapEnvironment/stages/cloneRepositories.md index b7fc250b1b..791edd29af 100644 --- a/documentation/docs/pipelines/abapEnvironment/stages/cloneRepositories.md +++ b/documentation/docs/pipelines/abapEnvironment/stages/cloneRepositories.md @@ -1,6 +1,6 @@ # Clone Repositories -This stage creates pulls/clones the specified software components (repositories) to the SAP BTP, ABAP environment system. As a prerequisite, the Communication Arrangement [SAP_COM_0510](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/b04a9ae412894725a2fc539bfb1ca055.html) (SAP BTP, ABAP Environment - Software Component Test Integration) is created using the step `cloudFoundryCreateServiceKey`. With the creation of the Communication Arrangement, a User and Password is created on the SAP BTP, ABAP environment system for the APIs that are used in this stage, as well as in the ATC stage. +This stage creates pulls/clones the specified software components (repositories) to the SAP BTP, ABAP environment system. As a prerequisite, the Communication Arrangement [SAP_COM_0948](https://help.sap.com/docs/ABAP_ENVIRONMENT/250515df61b74848810389e964f8c367/61f4d47af1394b1c8ad684b71d3ad6a0.html?locale=en-US) (Software Component Management Integration) is created using the step `cloudFoundryCreateServiceKey`. With the creation of the Communication Arrangement, a User and Password is created on the SAP BTP, ABAP environment system for the APIs that are used in this stage, as well as in the ATC stage. ## Steps diff --git a/documentation/docs/steps/abapEnvironmentCheckoutBranch.md b/documentation/docs/steps/abapEnvironmentCheckoutBranch.md index 3aeb70cd7b..282631ad27 100644 --- a/documentation/docs/steps/abapEnvironmentCheckoutBranch.md +++ b/documentation/docs/steps/abapEnvironmentCheckoutBranch.md @@ -5,7 +5,7 @@ ## Prerequisites A SAP BTP, ABAP environment system is available. -On this system, a [Communication User](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/0377adea0401467f939827242c1f4014.html), a [Communication System](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/1bfe32ae08074b7186e375ab425fb114.html) and a [Communication Arrangement](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/a0771f6765f54e1c8193ad8582a32edb.html) is setup for the Communication Scenario "SAP BTP, ABAP Environment - Software Component Test Integration (SAP_COM_0510)". This can be done manually through the respective applications on the SAP BTP, ABAP environment system or through creating a service key for the system on Cloud Foundry with the parameters {"scenario_id": "SAP_COM_0510", "type": "basic"}. In a pipeline, you can do this with the step [cloudFoundryCreateServiceKey](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateServiceKey/). In addition, the software component should be cloned into the system instance. You can do this with the step [abapEnvironmentCloneGitRepo](./abapEnvironmentCloneGitRepo.md). +On this system, a [Communication User](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/0377adea0401467f939827242c1f4014.html), a [Communication System](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/1bfe32ae08074b7186e375ab425fb114.html) and a [Communication Arrangement](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/a0771f6765f54e1c8193ad8582a32edb.html) is setup for the Communication Scenario "Software Component Management Integration (SAP_COM_0948)". This can be done manually through the respective applications on the SAP BTP, ABAP environment system or through creating a service key for the system on Cloud Foundry with the parameters {"scenario_id": "SAP_COM_0948", "type": "basic"}. In a pipeline, you can do this with the step [cloudFoundryCreateServiceKey](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateServiceKey/). In addition, the software component should be cloned into the system instance. You can do this with the step [abapEnvironmentCloneGitRepo](./abapEnvironmentCloneGitRepo.md). ## ${docGenParameters} diff --git a/documentation/docs/steps/abapEnvironmentCloneGitRepo.md b/documentation/docs/steps/abapEnvironmentCloneGitRepo.md index 6a81ac063e..8bdf906a74 100644 --- a/documentation/docs/steps/abapEnvironmentCloneGitRepo.md +++ b/documentation/docs/steps/abapEnvironmentCloneGitRepo.md @@ -5,7 +5,7 @@ ## Prerequisites A SAP BTP, ABAP environment system is available. -On this system, a [Communication User](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/0377adea0401467f939827242c1f4014.html), a [Communication System](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/1bfe32ae08074b7186e375ab425fb114.html) and a [Communication Arrangement](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/a0771f6765f54e1c8193ad8582a32edb.html) is setup for the Communication Scenario "SAP BTP, ABAP Environment - Software Component Test Integration (SAP_COM_0510)". This can be done manually through the respective applications on the SAP BTP, ABAP environment system or through creating a service key for the system on Cloud Foundry with the parameters {"scenario_id": "SAP_COM_0510", "type": "basic"}. In a pipeline, you can do this with the step [cloudFoundryCreateServiceKey](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateServiceKey/). +On this system, a [Communication User](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/0377adea0401467f939827242c1f4014.html), a [Communication System](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/1bfe32ae08074b7186e375ab425fb114.html) and a [Communication Arrangement](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/a0771f6765f54e1c8193ad8582a32edb.html) is setup for the Communication Scenario "Software Component Management Integration (SAP_COM_0948)". This can be done manually through the respective applications on the SAP BTP, ABAP environment system or through creating a service key for the system on Cloud Foundry with the parameters {"scenario_id": "SAP_COM_0948", "type": "basic"}. In a pipeline, you can do this with the step [cloudFoundryCreateServiceKey](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateServiceKey/). ## ${docGenParameters} diff --git a/documentation/docs/steps/abapEnvironmentCreateTag.md b/documentation/docs/steps/abapEnvironmentCreateTag.md index 08f8312ffd..3a44efbb1a 100644 --- a/documentation/docs/steps/abapEnvironmentCreateTag.md +++ b/documentation/docs/steps/abapEnvironmentCreateTag.md @@ -5,7 +5,7 @@ ## Prerequisites A SAP BTP, ABAP environment system is available. -On this system, a [Communication User](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/0377adea0401467f939827242c1f4014.html), a [Communication System](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/1bfe32ae08074b7186e375ab425fb114.html) and a [Communication Arrangement](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/a0771f6765f54e1c8193ad8582a32edb.html) is setup for the Communication Scenario "SAP BTP, ABAP Environment - Software Component Test Integration (SAP_COM_0510)". This can be done manually through the respective applications on the SAP BTP, ABAP environment system or through creating a service key for the system on Cloud Foundry with the parameters {"scenario_id": "SAP_COM_0510", "type": "basic"}. In a pipeline, you can do this with the step [cloudFoundryCreateServiceKey](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateServiceKey/). In addition, the software component should be cloned into the system instance. You can do this with the step [abapEnvironmentCloneGitRepo](./abapEnvironmentCloneGitRepo.md). +On this system, a [Communication User](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/0377adea0401467f939827242c1f4014.html), a [Communication System](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/1bfe32ae08074b7186e375ab425fb114.html) and a [Communication Arrangement](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/a0771f6765f54e1c8193ad8582a32edb.html) is setup for the Communication Scenario "Software Component Management Integration (SAP_COM_0948)". This can be done manually through the respective applications on the SAP BTP, ABAP environment system or through creating a service key for the system on Cloud Foundry with the parameters {"scenario_id": "SAP_COM_0948", "type": "basic"}. In a pipeline, you can do this with the step [cloudFoundryCreateServiceKey](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateServiceKey/). In addition, the software component should be cloned into the system instance. You can do this with the step [abapEnvironmentCloneGitRepo](./abapEnvironmentCloneGitRepo.md). ## ${docGenParameters} diff --git a/documentation/docs/steps/abapEnvironmentPullGitRepo.md b/documentation/docs/steps/abapEnvironmentPullGitRepo.md index 7b727a332c..2d3f9ef6e0 100644 --- a/documentation/docs/steps/abapEnvironmentPullGitRepo.md +++ b/documentation/docs/steps/abapEnvironmentPullGitRepo.md @@ -5,7 +5,7 @@ ## Prerequisites A SAP BTP, ABAP environment system is available. -On this system, a [Communication User](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/0377adea0401467f939827242c1f4014.html), a [Communication System](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/1bfe32ae08074b7186e375ab425fb114.html) and a [Communication Arrangement](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/a0771f6765f54e1c8193ad8582a32edb.html) is setup for the Communication Scenario "SAP BTP, ABAP Environment - Software Component Test Integration (SAP_COM_0510)". This can be done manually through the respective applications on the SAP BTP, ABAP environment system or through creating a service key for the system on Cloud Foundry with the parameters {"scenario_id": "SAP_COM_0510", "type": "basic"}. In a pipeline, you can do this with the step [cloudFoundryCreateServiceKey](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateServiceKey/). In addition, the software component should be cloned into the system instance. You can do this with the step [abapEnvironmentCloneGitRepo](./abapEnvironmentCloneGitRepo.md). +On this system, a [Communication User](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/0377adea0401467f939827242c1f4014.html), a [Communication System](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/1bfe32ae08074b7186e375ab425fb114.html) and a [Communication Arrangement](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/a0771f6765f54e1c8193ad8582a32edb.html) is setup for the Communication Scenario "Software Component Management Integration (SAP_COM_0948)". This can be done manually through the respective applications on the SAP BTP, ABAP environment system or through creating a service key for the system on Cloud Foundry with the parameters {"scenario_id": "SAP_COM_0948", "type": "basic"}. In a pipeline, you can do this with the step [cloudFoundryCreateServiceKey](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateServiceKey/). In addition, the software component should be cloned into the system instance. You can do this with the step [abapEnvironmentCloneGitRepo](./abapEnvironmentCloneGitRepo.md). ## ${docGenParameters} diff --git a/pkg/abaputils/abaputils.go b/pkg/abaputils/abaputils.go index 6f3d20bf35..caf6cb9938 100644 --- a/pkg/abaputils/abaputils.go +++ b/pkg/abaputils/abaputils.go @@ -59,7 +59,7 @@ func (abaputils *AbapUtils) GetAbapCommunicationArrangementInfo(options AbapEnvi connectionDetails.Password = options.Password } else { if options.CfAPIEndpoint == "" || options.CfOrg == "" || options.CfSpace == "" || options.CfServiceInstance == "" || options.CfServiceKeyName == "" { - var err = errors.New("Parameters missing. Please provide EITHER the Host of the ABAP server OR the Cloud Foundry ApiEndpoint, Organization, Space, Service Instance and a corresponding Service Key for the Communication Scenario SAP_COM_0510") + var err = errors.New("Parameters missing. Please provide EITHER the Host of the ABAP server OR the Cloud Foundry API Endpoint, Organization, Space, Service Instance and Service Key") log.SetErrorCategory(log.ErrorConfiguration) return connectionDetails, err } diff --git a/pkg/abaputils/abaputils_test.go b/pkg/abaputils/abaputils_test.go index 56688f7aec..d9b0cafa2d 100644 --- a/pkg/abaputils/abaputils_test.go +++ b/pkg/abaputils/abaputils_test.go @@ -45,7 +45,7 @@ func TestCloudFoundryGetAbapCommunicationInfo(t *testing.T) { assert.Equal(t, "", connectionDetails.Password) assert.Equal(t, "", connectionDetails.XCsrfToken) - assert.EqualError(t, err, "Parameters missing. Please provide EITHER the Host of the ABAP server OR the Cloud Foundry ApiEndpoint, Organization, Space, Service Instance and a corresponding Service Key for the Communication Scenario SAP_COM_0510") + assert.EqualError(t, err, "Parameters missing. Please provide EITHER the Host of the ABAP server OR the Cloud Foundry API Endpoint, Organization, Space, Service Instance and Service Key") }) t.Run("CF GetAbapCommunicationArrangementInfo - Error - reading service Key", func(t *testing.T) { //given diff --git a/resources/com.sap.piper/pipeline/abapEnvironmentPipelineDefaults.yml b/resources/com.sap.piper/pipeline/abapEnvironmentPipelineDefaults.yml index 79d294985a..dee60fe06a 100644 --- a/resources/com.sap.piper/pipeline/abapEnvironmentPipelineDefaults.yml +++ b/resources/com.sap.piper/pipeline/abapEnvironmentPipelineDefaults.yml @@ -12,12 +12,11 @@ stages: abapSystemIsDevelopmentAllowed: 'false' abapSystemSizeOfPersistence: 2 abapSystemSizeOfRuntime: 1 - cfServiceKeyName: 'sap_com_0510' cfAsync: false 'Clone Repositories': - cfServiceKeyName: 'sap_com_0510' - cfServiceKeyConfig: '{"scenario_id":"SAP_COM_0510","type":"basic"}' + cfServiceKeyName: 'sap_com_0948' + cfServiceKeyConfig: '{"scenario_id":"SAP_COM_0948","type":"basic"}' cfAsync: false ordinal: 30 diff --git a/resources/metadata/abapEnvironmentCheckoutBranch.yaml b/resources/metadata/abapEnvironmentCheckoutBranch.yaml index 65f0aeb8b6..37d2729b76 100644 --- a/resources/metadata/abapEnvironmentCheckoutBranch.yaml +++ b/resources/metadata/abapEnvironmentCheckoutBranch.yaml @@ -5,8 +5,8 @@ metadata: This step switches between branches of a git repository (Software Component) on a SAP BTP ABAP Environment system. Please provide either of the following options: - * The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0510](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/b04a9ae412894725a2fc539bfb1ca055.html). - * The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0510. + * The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0948](https://help.sap.com/docs/sap-btp-abap-environment/abap-environment/api-for-managing-software-components-61f4d47af1394b1c8ad684b71d3ad6a0?locale=en-US). + * The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0948. * Only provide one of those options with the respective credentials. If all values are provided, the direct communication (via host) has priority. spec: @@ -21,7 +21,7 @@ spec: params: - name: username type: string - description: User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510 + description: User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948 scope: - PARAMETERS - STAGES @@ -34,7 +34,7 @@ spec: param: username - name: password type: string - description: Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510 + description: Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948 scope: - PARAMETERS - STAGES diff --git a/resources/metadata/abapEnvironmentCloneGitRepo.yaml b/resources/metadata/abapEnvironmentCloneGitRepo.yaml index e4d4035cf0..e3d3828388 100644 --- a/resources/metadata/abapEnvironmentCloneGitRepo.yaml +++ b/resources/metadata/abapEnvironmentCloneGitRepo.yaml @@ -5,8 +5,8 @@ metadata: Clones a git repository (Software Component) to a SAP BTP ABAP Environment system. If the repository is already cloned, the step will checkout the configured branch and pull the specified commit, instead. Please provide either of the following options: - * The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0510](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/b04a9ae412894725a2fc539bfb1ca055.html). - * The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0510. + * The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0948](https://help.sap.com/docs/sap-btp-abap-environment/abap-environment/api-for-managing-software-components-61f4d47af1394b1c8ad684b71d3ad6a0?locale=en-US). + * The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0948. * Only provide one of those options with the respective credentials. If all values are provided, the direct communication (via host) has priority. spec: @@ -21,7 +21,7 @@ spec: params: - name: username type: string - description: User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510 + description: User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948 scope: - PARAMETERS - STAGES @@ -34,7 +34,7 @@ spec: param: username - name: password type: string - description: Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510 + description: Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948 scope: - PARAMETERS - STAGES diff --git a/resources/metadata/abapEnvironmentCreateTag.yaml b/resources/metadata/abapEnvironmentCreateTag.yaml index 58403f3add..947db9d7f2 100644 --- a/resources/metadata/abapEnvironmentCreateTag.yaml +++ b/resources/metadata/abapEnvironmentCreateTag.yaml @@ -5,8 +5,8 @@ metadata: Creates tags for specific commits of one or multiple repositories / software components. The tag can be specified explicitly as well as being generated by an addon product version or an addon component version. Please provide either of the following options: - * The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0510](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/b04a9ae412894725a2fc539bfb1ca055.html). - * The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0510. + * The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0948](https://help.sap.com/docs/sap-btp-abap-environment/abap-environment/api-for-managing-software-components-61f4d47af1394b1c8ad684b71d3ad6a0?locale=en-US). + * The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0948. * Only provide one of those options with the respective credentials. If all values are provided, the direct communication (via host) has priority. spec: @@ -21,7 +21,7 @@ spec: params: - name: username type: string - description: User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510 + description: User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948 scope: - PARAMETERS - STAGES @@ -34,7 +34,7 @@ spec: param: username - name: password type: string - description: Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510 + description: Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948 scope: - PARAMETERS - STAGES diff --git a/resources/metadata/abapEnvironmentPullGitRepo.yaml b/resources/metadata/abapEnvironmentPullGitRepo.yaml index 576a4e7652..ba3da2f3e9 100644 --- a/resources/metadata/abapEnvironmentPullGitRepo.yaml +++ b/resources/metadata/abapEnvironmentPullGitRepo.yaml @@ -5,8 +5,8 @@ metadata: Pulls a git repository (Software Component) to a SAP BTP ABAP Environment system. Please provide either of the following options: - * The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0510](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/b04a9ae412894725a2fc539bfb1ca055.html). - * The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0510. + * The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0948](https://help.sap.com/docs/sap-btp-abap-environment/abap-environment/api-for-managing-software-components-61f4d47af1394b1c8ad684b71d3ad6a0?locale=en-US). + * The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0948. * Only provide one of those options with the respective credentials. If all values are provided, the direct communication (via host) has priority. spec: @@ -21,7 +21,7 @@ spec: params: - name: username type: string - description: User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510 + description: User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948 scope: - PARAMETERS - STAGES @@ -34,7 +34,7 @@ spec: param: username - name: password type: string - description: Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510 + description: Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948 scope: - PARAMETERS - STAGES