cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble Executing abapEnvironmentRunATCCheck with SAP Piper command on Azure DevOps Pipeline

saurabh_chikate
Active Participant
0 Kudos

Dear Experts,

I'm currently working on setting up DevOps for SAP BTP ABAP Environment using the SAP Piper project. I have successfully cached the Piper executable at runtime and can execute Cloud Foundry commands from my pipeline. However, I'm facing a specific challenge when attempting to run the `abapEnvironmentRunATCCheck` command. Despite providing what I believe to be all the necessary parameters for my SAP BTP account, I'm encountering the following error message:

fatal abapEnvironmentRunATCCheck - step execution failed -
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.

Command that I managed to compile from the documentation was as below

bin/piper abapEnvironmentRunATCCheck --verbose --cfOrg
'my-org' --cfSpace 'CF-Space-name' --cfApiEndpoint
'https://api.cf.euXX.hana.ondemand.com/' --username 'myusername' --password
'myPassword' --atcConfig: 'atcconfig.yml'

Please note that the `atcconfig.yml` file is located in the same directory as the pipeline.

I also tried running another version of the same command where username and password of my account was replaced with communication user credentials for both scenarios. This as expected did not help either.

I've consulted SAP documentation, which indicates that the Communication Scenario `SAP_COM_0510` is no longer valid. As a result, I've reconfigured the pipeline to use the new scenario `SAP_COM_0901`. However, I'm uncertain whether the `abapEnvironmentRunATCCheck` command is correctly invoking this new Communication Scenario.

Questions:

1. How can I ensure that the `abapEnvironmentRunATCCheck` command correctly invokes the new Communication Scenario, `SAP_COM_0901`?

2. Are there any specific parameters or additional configurations that I need to adjust for `abapEnvironmentRunATCCheck` ?

I'd greatly appreciate any assistance or insights on resolving this issue and ensuring that the correct Communication Scenario is applied during the execution of the `abapEnvironmentRunATCCheck` command.

View Entire Topic
DanielMieg
Advisor
Advisor

Hi!

Thanks for your question. I believe you need to add two more parameters: 'cfServiceKeyName' and 'cfServiceInstance'. 'cfServiceInstance' would point to the SAP BTP, ABAP Environment system (the name it has in the BTP Cockpit). 'cfServiceKeyName' would point to the service key for SAP_COM_0901 of the instance specified with 'cfServiceInstance'.

In your setup, the service key must be created beforehand. This can be done in the BTP Cockpit. During the creation of the service key, you need to provide a name and a json configuration. The json configuration should look like this:

{
  "scenario_id": "SAP_COM_0901",
  "type": "basic"
}

In the abapEnvironmentRunATCCheck configuration, you reference the name of the service key.

Please let me know if you have any further questions.

Best regards

Daniel

saurabh_chikate
Active Participant

Hello Daniel,

Thanks for taking time to read through and helping with your response.

Creating a key with scenario details and adding 2 additional parameters solved the issue.

Adding the code below for reference to future readers.

bin/piper abapEnvironmentRunATCCheck --verbose --cfOrg 'MyCFOrg' --cfSpace 'MyCFSpace' --cfApiEndpoint 'https://api.cf.zzzz.hana.ondemand.com/' --username 'zzzz' --password 'zzzz' --atcConfig 'atcconfig.yml' --cfServiceKeyName 'ServiceKeyCreatedwithCOmmScenarioParams' --cfServiceInstance 'ABAPServInstance'
saurabh_chikate
Active Participant
0 Kudos

I am still facing one challenge though. It is related to locating the atcconfig.yml file.

I initially placed the atcconfig.yml file in the same directory as my pipeline, both of which are in the root folder of my project. Additionally, I also tried creating a separate folder named .pipeline and placing the atcconfig.yml file there. Despite these attempts, the issue persisted.

At this point, I believe the location and contents of the atcconfig.yml file are correct, and I've referred to the SAP Piper documentation to ensure that it adheres to the guidelines for writing the file.

Given these efforts, I'm starting to suspect that the issue might be related to pipeline compatibility or other configuration factors that I may have missed. All this is being done on Azure Pipeline and I keep on seeing document references which are very specific to Jenkins.

Here is the file content snapshot.

objectset:
softwarecomponents:
- name: ZAZ_TEST001
packages:
- name: ZAZ_TEST001