From 86b3b75594c12ccb2852164893c07c47ea1ac5bd Mon Sep 17 00:00:00 2001 From: DanielMieg Date: Wed, 8 May 2024 11:11:11 +0200 Subject: [PATCH 1/5] Migrate SAP_COM_0510 to SAP_COM_0948 --- cmd/abapEnvironmentCheckoutBranch_generated.go | 8 ++++---- cmd/abapEnvironmentCloneGitRepo_generated.go | 8 ++++---- cmd/abapEnvironmentCreateTag_generated.go | 8 ++++---- cmd/abapEnvironmentPullGitRepo_generated.go | 8 ++++---- .../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 +- .../pipeline/abapEnvironmentPipelineDefaults.yml | 5 ++--- resources/metadata/abapEnvironmentCheckoutBranch.yaml | 8 ++++---- resources/metadata/abapEnvironmentCloneGitRepo.yaml | 8 ++++---- resources/metadata/abapEnvironmentCreateTag.yaml | 8 ++++---- resources/metadata/abapEnvironmentPullGitRepo.yaml | 8 ++++---- 15 files changed, 40 insertions(+), 41 deletions(-) diff --git a/cmd/abapEnvironmentCheckoutBranch_generated.go b/cmd/abapEnvironmentCheckoutBranch_generated.go index 7c19d333f8..89e3d5e849 100644 --- a/cmd/abapEnvironmentCheckoutBranch_generated.go +++ b/cmd/abapEnvironmentCheckoutBranch_generated.go @@ -46,8 +46,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() @@ -135,8 +135,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 ca08f51007..d60b2ff76b 100644 --- a/cmd/abapEnvironmentCloneGitRepo_generated.go +++ b/cmd/abapEnvironmentCloneGitRepo_generated.go @@ -46,8 +46,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() @@ -135,8 +135,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 cb25dc6f4d..2039810749 100644 --- a/cmd/abapEnvironmentCreateTag_generated.go +++ b/cmd/abapEnvironmentCreateTag_generated.go @@ -50,8 +50,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() @@ -139,8 +139,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 3056f544a5..4648870120 100644 --- a/cmd/abapEnvironmentPullGitRepo_generated.go +++ b/cmd/abapEnvironmentPullGitRepo_generated.go @@ -48,8 +48,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() @@ -137,8 +137,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/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/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 8290313cdd..d85035369c 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 9f3fb2360d..9ec1385f34 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 a5b25cde74..a5c4b51394 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 f9e2d910e7..a27665058e 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 From 07de9b929df3d28cdf9f270facbb6ab248d35ffa Mon Sep 17 00:00:00 2001 From: DanielMieg Date: Thu, 16 May 2024 09:58:02 +0200 Subject: [PATCH 2/5] Update error message --- pkg/abaputils/abaputils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/abaputils/abaputils.go b/pkg/abaputils/abaputils.go index 6f3d20bf35..a36d6142fc 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 ApiEndpoint, Organization, Space and Service Instance") log.SetErrorCategory(log.ErrorConfiguration) return connectionDetails, err } From 12a83ea00687197c425116e1618468c0a1c33720 Mon Sep 17 00:00:00 2001 From: DanielMieg Date: Thu, 16 May 2024 10:00:45 +0200 Subject: [PATCH 3/5] Update error message --- pkg/abaputils/abaputils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/abaputils/abaputils.go b/pkg/abaputils/abaputils.go index a36d6142fc..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 and Service Instance") + 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 } From 3d33e9ade82f5f89b83ef6b908ef25da0abd167f Mon Sep 17 00:00:00 2001 From: DanielMieg Date: Thu, 16 May 2024 10:07:35 +0200 Subject: [PATCH 4/5] Fix error message in unit test --- pkg/abaputils/abaputils_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/abaputils/abaputils_test.go b/pkg/abaputils/abaputils_test.go index 56688f7aec..48ee9aa853 100644 --- a/pkg/abaputils/abaputils_test.go +++ b/pkg/abaputils/abaputils_test.go @@ -1,6 +1,3 @@ -//go:build unit -// +build unit - package abaputils import ( @@ -45,7 +42,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 From 1ee3513181ec33398e01e4adb1712a7d65900843 Mon Sep 17 00:00:00 2001 From: DanielMieg Date: Thu, 16 May 2024 10:09:21 +0200 Subject: [PATCH 5/5] Update unit tests --- cmd/abapEnvironmentRunATCCheck_test.go | 4 ++-- pkg/abaputils/abaputils_test.go | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) 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/pkg/abaputils/abaputils_test.go b/pkg/abaputils/abaputils_test.go index 48ee9aa853..d9b0cafa2d 100644 --- a/pkg/abaputils/abaputils_test.go +++ b/pkg/abaputils/abaputils_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package abaputils import (