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!

What are the error messages in the pipeline log?

I have not been able to test the pipeline steps on Azure yet.

On Jenkins, the file must be in the pipeline's root folder. The pipeline files get copied to the workspace of the Jenkins job during the runtime.

saurabh_chikate
Active Participant
0 Kudos

Thanks for your reply Daniel,

Pipeline configuration and Piper commands are placed to into azure-pipeline.yml. atcconfig.yml file is as well in the same directory.

Below is the structure of repository root directory.

Error we encountered is as below. Please have a look at line number 09

01 debug abapEnvironmentRunATCCheck - --------------------------------
02 debug abapEnvironmentRunATCCheck - --> GET request to https://replacedByDummyURL.hana.ondemand.com/sap/bc/adt/api/atc/runs/0000000000000000000000000000000...
03 debug abapEnvironmentRunATCCheck - headers: map[Accept:[application/vnd.sap.atc.run.v1+xml] Authorization:[<set>] X-Csrf-Token:[fetch]]
04 debug abapEnvironmentRunATCCheck - cookies:
05 debug abapEnvironmentRunATCCheck - --------------------------------
06 debug abapEnvironmentRunATCCheck - <-- response 200 https://replacedByDummyURL.hana.ondemand.com/sap/bc/adt/api/atc/runs/0000000000000000000000000000000... (240.5ms)
07 debug abapEnvironmentRunATCCheck - --------------------------------
08 info abapEnvironmentRunATCCheck - fatal error: errorDetails{"category":"undefined","correlationId":"https://replacedByDummyAzureRepoURL/_build/results?buildId=215493","error":"No configuration provided - please provide either an ATC configuration file or a repository configuration file","library":"SAP/jenkins-library","message":"step execution failed","result":"failure","stepName":"abapEnvironmentRunATCCheck","time":"2023-10-26T09:03:33.843905691Z"}
09 fatal abapEnvironmentRunATCCheck - step execution failed - No configuration provided - please provide either an ATC configuration file or a repository configuration file
10 info abapEnvironmentRunATCCheck - Step telemetry data:{"StepStartTime":"2023-10-26 09:03:30.522247701 +0000 UTC","PipelineURLHash":"2cc70b6d699a7d01de604b9c25a4ce0df3a6255c","BuildURLHash":"264cf95c22b883639f1c7494a999026570920946","StageName":"CreateABAPEnvironmentSystem","StepName":"abapEnvironmentRunATCCheck","ErrorCode":"1","StepDuration":"3323","ErrorCategory":"undefined","CorrelationID":"https://replacedByDummyAzureRepoURL/_build/results?buildId=215493","PiperCommitHash":"5f4cd838cfd4fc7825c0587d6b432808dc97b3f0","ErrorDetail":{"category":"undefined","correlationId":"https://replacedByDummyAzureRepoURL/_build/results?buildId=215493","error":"No configuration provided - please provide either an ATC configuration file or a repository configuration file","library":"SAP/jenkins-library","message":"step execution failed","result":"failure","stepName":"abapEnvironmentRunATCCheck","time":"2023-10-26T09:03:33.843905691Z"}}
11 debug abapEnvironmentRunATCCheck - Sending telemetry data
12 debug abapEnvironmentRunATCCheck - no trusted certs found / using default transport / insecure skip set to true / : continuing with existing tls config
13 debug abapEnvironmentRunATCCheck - Transport timeout: 3m0s, max request duration: 5s
14 debug abapEnvironmentRunATCCheck - --------------------------------
15 debug abapEnvironmentRunATCCheck - --> GET request to https://webanalytics.cfapps.eu10.hana.ondemand.com/tracker/log?action_name=Piper+Library+OS&custom10...
16 debug abapEnvironmentRunATCCheck - headers: map[]
17 debug abapEnvironmentRunATCCheck - cookies:
18 debug abapEnvironmentRunATCCheck - --------------------------------
19 debug abapEnvironmentRunATCCheck - <-- response 204 https://webanalytics.cfapps.eu10.hana.ondemand.com/tracker/log?action_name=Piper+Library+OS&custom10... (102.18ms)
20 debug abapEnvironmentRunATCCheck - --------------------------------
What I have tried
  1. I tried placing file inside .pipeline folder as well just to be sure but it does not seem to work.
  2. Tried renaming the file name parameter in the pipeline code keeping the actual name same. Here I got error telling me the file is not found. It tells that the file is readable by pipeline but it could not understand the ATC Check config that is given in the file. File config syntax is referred from SAP Piper documentation referring to ATC Check command. I have also tried multiple combinations of parameters to no avail.
objectset:
softwarecomponents:
- name: ZAZ_TEST001
packages:
- name: ZAZ_TEST001
Thanks again for your time and any insights on this would be appreciated.