SAP / jenkins-library

Jenkins shared library for Continuous Delivery pipelines.
https://www.project-piper.io
Apache License 2.0
772 stars 586 forks source link

Getting Error while executing Project Piper from Azure DevOps when building GCTS based pipeline #4866

Closed srinihanes closed 1 month ago

srinihanes commented 4 months ago

Hi Team, updated 03/25/2024. I am using the Project Piper scenario to set up a Pipeline-Based ABAP Development and Testing Process Using Git-enabled change and Transport System by using Azure DevOps instead of Jenkins but i am getting the below error. and i have attached my Azure DevOps Pipeline Could you please help me to fix this issue? Error Log:

2024-03-25T13:43:47.3723621Z info gctsDeploy - Start of gCTS Deploy Step with Configuration Values: &{ mycompany-brands-sn4_git_poc https://myhoast.sap.mycompany-hec.com:44300 100 https://mypat@github.com/mycompany-brands/SN4_GIT_POC SOURCE VD3 GIT NewFeature CRNTCOMMIT true map[] map[] false} 2024-03-25T13:43:47.3726234Z info gctsDeploy - Starting to retrieve configuration metadata from the system 2024-03-25T13:43:47.5970131Z info gctsDeploy - System Available for further step processing. The configuration metadata was successfully retrieved. 2024-03-25T13:43:47.5972239Z info gctsDeploy - gCTS Deploy : Checking if repository mycompany-brands-sn4_git_poc already exists 2024-03-25T13:43:47.7542666Z info gctsDeploy - Repository mycompany-brands-sn4_git_poc already exists in the system, Checking for deploy scope 2024-03-25T13:43:47.7544750Z info gctsDeploy - Deploy scope exists for the repository in the configuration file 2024-03-25T13:43:47.7545734Z info gctsDeploy - gCTS Deploy: Deploying Commit to ABAP System for Repository mycompany-brands-sn4_git_poc with scope CRNTCOMMIT 2024-03-25T13:43:47.7546763Z info gctsDeploy - gCTS Deploy : Start of deploying commit to ABAP System. 2024-03-25T13:43:52.7128377Z error gctsDeploy - Unknown error occurred. 2024-03-25T13:43:52.7480778Z error gctsDeploy - Time: 20240325134352, User: **, Section: CLIENT_TP, Action: GET_REPOSITORY_FILES, Severity: ERROR, Message: 20240325134352: Error action GET_REPOSITORY_FILES** 2024-03-25T13:43:52.7483104Z error gctsDeploy - Type: Paramters 2024-03-25T13:43:52.7485145Z error gctsDeploy - {"logfile":"/usr/sap/SC7/D00/gcts/mycompany-brands-sn4_git_poc/log/20240325_134347_B273538EB09520DB44A271AA800C4B75.log","repodir":"/usr/sap/SC7/D00/gcts/mycompany-brands-sn4_git_poc/data/","loglevel":"warning","remoteplatform":"GITHUB","command":"getrepositoryfiles","commit":"bf7eb6e6e26b8486f3196f0ae7ddb9f36445d9c3"}

2024-03-25T13:43:52.8071335Z error gctsDeploy - 2024-03-25T13:43:52.8071876Z error gctsDeploy - Starting getting the files of the repository 2024-03-25T13:43:52.8072326Z error gctsDeploy - 2024-03-25T13:43:52.8072854Z error gctsDeploy - Repository of type 'git' instantiated 2024-03-25T13:43:52.8073272Z error gctsDeploy - 2024-03-25T13:43:52.8073889Z error gctsDeploy - Starting jgit specific getting files of the repository 2024-03-25T13:43:52.8074346Z error gctsDeploy - 2024-03-25T13:43:52.8075383Z error gctsDeploy - Performing 'fetch': downloading objects and references from another repository ... 2024-03-25T13:43:52.8075856Z error gctsDeploy - 2024-03-25T13:43:52.8076865Z error gctsDeploy - - Remote (URI or name) : origin 2024-03-25T13:43:52.8077553Z error gctsDeploy - - Remove deleted references: true 2024-03-25T13:43:52.8078148Z error gctsDeploy - 2024-03-25T13:43:52.8078926Z error gctsDeploy - ERROR: Downloading objects and references from another repository failed: https://github.com/mycompany-brands/SN4_GIT_POC: not authorized 2024-03-25T13:43:52.8079505Z error gctsDeploy - 2024-03-25T13:43:52.8080135Z error gctsDeploy - Downloading objects and references from another repository took 886 ms 2024-03-25T13:43:52.8080652Z error gctsDeploy - 2024-03-25T13:43:52.8081283Z error gctsDeploy - Getting the commit with the ID 'bf7eb6e6e26b8486f3196f0ae7ddb9f36445d9c3' ... 2024-03-25T13:43:52.8081811Z error gctsDeploy - 2024-03-25T13:43:52.8082383Z error gctsDeploy - Performing 'log': showing commit logs ... 2024-03-25T13:43:52.8082879Z error gctsDeploy - 2024-03-25T13:43:52.8083477Z error gctsDeploy - - All : false 2024-03-25T13:43:52.8084209Z error gctsDeploy - - The commit to start graph traversal from : bf7eb6e6e26b8486f3196f0ae7ddb9f36445d9c3 2024-03-25T13:43:52.8084999Z error gctsDeploy - - Limit the number of commits to output : 1 2024-03-25T13:43:52.8085541Z error gctsDeploy -

2024-03-25T13:43:52.8092097Z error gctsDeploy - 2024-03-25T13:43:52.8092702Z error gctsDeploy - Showing commit logs took 6 ms 2024-03-25T13:43:52.8093189Z error gctsDeploy - 2024-03-25T13:43:52.8093770Z error gctsDeploy - Getting the commit by its ID took 6 ms 2024-03-25T13:43:52.8094258Z error gctsDeploy - 2024-03-25T13:43:52.8094830Z error gctsDeploy - Getting the files of the repository ... 2024-03-25T13:43:52.8095427Z error gctsDeploy - 2024-03-25T13:43:52.8096195Z error gctsDeploy - - Do not enter subtrees when performing a 'TreeWalk': false 2024-03-25T13:43:52.8096975Z error gctsDeploy - - Perform a 'TreeWalk' on this commit's tree : bf7eb6e6e26b8486f3196f0ae7ddb9f36445d9c3 2024-03-25T13:43:52.8097518Z error gctsDeploy - 2024-03-25T13:43:52.8098246Z error gctsDeploy - Get files of repository result - 121 file(s)/folder(s) found: 2024-03-25T13:43:52.8098772Z error gctsDeploy - 2024-03-25T13:43:52.8099281Z error gctsDeploy - - .gcts.properties.json 2024-03-25T13:43:52.8100219Z error gctsDeploy - - .gctsmetadata 2024-03-25T13:43:52.8100807Z error gctsDeploy - - .gctsmetadata/nametabs 2024-03-25T13:43:52.8101401Z error gctsDeploy - - .gctsmetadata/nametabs/D020T.asx.json 2024-03-25T13:43:52.8102025Z error gctsDeploy - - .gctsmetadata/nametabs/D021T.asx.json 2024-03-25T13:43:52.8102649Z error gctsDeploy - - .gctsmetadata/nametabs/D347T.asx.json 2024-03-25T13:43:52.8103273Z error gctsDeploy - - .gctsmetadata/nametabs/DDDDLSRC.asx.json 2024-03-25T13:43:52.8103930Z error gctsDeploy - - .gctsmetadata/nametabs/DDDDLSRC02BT.asx.json 2024-03-25T13:43:52.8104577Z error gctsDeploy - - .gctsmetadata/nametabs/DDDDLSRCT.asx.json

2024-03-25T13:43:52.8134655Z error gctsDeploy - - ... 2024-03-25T13:43:52.8135120Z error gctsDeploy - 2024-03-25T13:43:52.8135758Z error gctsDeploy - + 71 further file(s)/folder(s) 2024-03-25T13:43:52.8136372Z error gctsDeploy - 2024-03-25T13:43:52.8136986Z error gctsDeploy - Getting the files of the repository took 6 ms 2024-03-25T13:43:52.8137480Z error gctsDeploy - 2024-03-25T13:43:52.8138202Z error gctsDeploy - Overall process time: 1029 ms 2024-03-25T13:43:52.8139150Z error gctsDeploy - 2024-03-25T13:43:52.8139772Z error gctsDeploy - Getting the files of the repository took 1029 ms. 2024-03-25T13:43:52.8140282Z error gctsDeploy - 2024-03-25T13:43:52.8140823Z error gctsDeploy - End of transport: 0008 2024-03-25T13:43:52.8141456Z error gctsDeploy - Date & time : 25.03.2024 - 13:43:52 2024-03-25T13:43:52.8142213Z error gctsDeploy - Creating the [requestID].response-file '20240325_134347_B273538EB09520DB44A271AA800C4B75.response' 2024-03-25T13:43:52.8142767Z error gctsDeploy - 2024-03-25T13:43:52.8143406Z error gctsDeploy - The [requestID].response-file contains the following sections: 2024-03-25T13:43:52.8143964Z error gctsDeploy - 2024-03-25T13:43:52.8144498Z error gctsDeploy - - 'applicationAttributes' 2024-03-25T13:43:52.8144979Z error gctsDeploy - 2024-03-25T13:43:52.8145597Z error gctsDeploy - - 'name': 'ABAP to VCS (c) - SAP SE 2022' 2024-03-25T13:43:52.8146468Z error gctsDeploy - - 'technicalName': 'abap2vcs.jar' 2024-03-25T13:43:52.8147248Z error gctsDeploy - - 'description': 'Bring ABAP transportable objects to version control systems (VCS) like Git using the ABAP transport mechanism' 2024-03-25T13:43:52.8147968Z error gctsDeploy - - ... 2024-03-25T13:43:52.8148519Z error gctsDeploy -

2024-03-25T13:43:52.8207316Z error gctsDeploy - 2024-03-25T13:43:52.8207800Z error gctsDeploy - - 'code': 'GCTS.CLIENT.3302' 2024-03-25T13:43:52.8208285Z error gctsDeploy - - 'type': 'ERROR' 2024-03-25T13:43:52.8208992Z error gctsDeploy - - 'message': 'Downloading objects and references from another repository failed: https://github.com/mycompany-brands/SN4_GIT_POC: not authorized' 2024-03-25T13:43:52.8209576Z error gctsDeploy - - ... 2024-03-25T13:43:52.8209960Z error gctsDeploy - 2024-03-25T13:43:52.8210747Z error gctsDeploy - - 'openResult' 2024-03-25T13:43:52.8211155Z error gctsDeploy - 2024-03-25T13:43:52.8211717Z error gctsDeploy - - 'directory': '/usr/sap/SC7/D00/gcts/mycompany-brands-sn4_git_poc/data/.git' 2024-03-25T13:43:52.8212257Z error gctsDeploy - - 'isBare': 'false' 2024-03-25T13:43:52.8212761Z error gctsDeploy - - 'hasDetachedHead': 'false' 2024-03-25T13:43:52.8213245Z error gctsDeploy - - ... 2024-03-25T13:43:52.8213652Z error gctsDeploy - 2024-03-25T13:43:52.8214137Z error gctsDeploy - - 'remoteCommunications' 2024-03-25T13:43:52.8214513Z error gctsDeploy - 2024-03-25T13:43:52.8215095Z error gctsDeploy - - 'remoteActivity': 'Fetching - Downloading objects and references from another repository' 2024-03-25T13:43:52.8215778Z error gctsDeploy - - 'type': 'HTTPS with token' 2024-03-25T13:43:52.8216499Z error gctsDeploy - - 'token': '****' 2024-03-25T13:43:52.8216987Z error gctsDeploy - - ... 2024-03-25T13:43:52.8217385Z error gctsDeploy - 2024-03-25T13:43:52.8218149Z error gctsDeploy - The [requestID].response-file '20240325_134347_B273538EB09520DB44A271AA800C4B75.response' has been created in the directory '/usr/sap/SC7/D00/gcts/mycompany-brands-sn4_git_poc/response/' 2024-03-25T13:43:52.8218695Z error gctsDeploy - 2024-03-25T13:43:52.8219145Z error gctsDeploy - Type: Client Stack Log 2024-03-25T13:43:52.8221263Z error gctsDeploy - [{"code":"GCTS.CLIENT.3302","type":"ERROR","step":"FETCH.OBJECTS.AND.REFERENCES","message":"Downloading objects and references from another repository failed: https://github.com/mycompany/SN4_GIT_POC: not authorized","stack":["java.lang.Thread.getStackTrace(Thread.java:1178)","com.sap.sl.abap2vcs.base.logs.TWLogUtilities.logError(TWLogUtilities.java:591)","com.sap.sl.abap2vcs.commands.git.TWCommandOnGitRepository.fetch(TWCommandOnGitRepository.java:1473)","com.sap.sl.abap2vcs.commands.git.TWGetGitFilesList.executeCommand(TWGetGitFilesList.java:51)","com.sap.sl.abap2vcs.commands.TWCommand.execute(TWCommand.java:42)","com.sap.sl.abap2vcs.main.TWABAPToVCS.executeCommand(TWABAPToVCS.java:158)","com.sap.sl.abap2vcs.main.TWABAPToVCS.execute(TWABAPToVCS.java:148)","com.sap.sl.abap2vcs.main.TWABAPToVCS.main(TWABAPToVCS.java:650)"]}] 2024-03-25T13:43:52.8222992Z error gctsDeploy - Time: 0, User: , Section: , Action: , Severity: ERROR, Message: Downloading objects and references from another repository failed: https://github.com/mycompany/SN4_GIT_POC: not authorized 2024-03-25T13:43:52.8223868Z error gctsDeploy - Time: 20240325134352, User: ****, Section: REPOSITORY, Action: DEPLOY, Severity: ERROR, Message: 20240325134352: Error action DEPLOY 2024-03-25T13:43:52.8224493Z error gctsDeploy - Failed During Deploy to Abap system 2024-03-25T13:43:52.8225523Z error gctsDeploy - step execution failed at Deploying Commit to ABAP system. - request to https://myhoast.sap.mycompany-hec.com:44300/sap/bc/cts_abapvcs/repository/mycompany-sn4_git_poc/deploy?sap-client=100 returned with response 500 Internal Server Error 2024-03-25T13:43:52.8227382Z info gctsDeploy - fatal error: errorDetails{"category":"undefined","correlationId":"https://dev.azure.com/hbibi/SAPDevOpsPOC/mycompany.SN4_GIT_POC/_build/results?buildId=30725","error":"request to https://myhoastsap.mycompany-hec.com:44300/sap/bc/cts_abapvcs/repository/mycompany-sn4_git_poc/deploy?sap-client=100 returned with response 500 Internal Server Error","library":"SAP/jenkins-library","message":"step execution failed","result":"failure","stepName":"gctsDeploy","time":"2024-03-25T09:43:52.74671074-04:00"} 2024-03-25T13:43:52.8229023Z fatal gctsDeploy - step execution failed - request to https://vmyhoast.sap.mycompany-hec.com:44300/sap/bc/cts_abapvcs/repository/mycompany-sn4_git_poc/deploy?sap-client=100 returned with response 500 Internal Server Error 2024-03-25T13:43:52.8231395Z info gctsDeploy - Step telemetry data:{"StepStartTime":"2024-03-25 13:43:47.371073508 +0000 UTC","PipelineURLHash":"c8438a599731a8f6e81064e18fd4a7f0e6f28f64","BuildURLHash":"6385d6f4f30a47c2f4466c01df73ee18e82d4260","StageName":"__default","StepName":"gctsDeploy","ErrorCode":"1","StepDuration":"5376","ErrorCategory":"undefined","CorrelationID":"https://dev.azure.com/hbibi/SAPDevOpsPOC/mycompany.SN4_GIT_POC/_build/results?buildId=30725","PiperCommitHash":"2d2d3575990356f6c6742722e500ab8f3b175729","ErrorDetail":{"category":"undefined","correlationId":"https://dev.azure.com/hbibi/SAPDevOpsPOC/mycompany.SN4_GIT_POC/_build/results?buildId=30725","error":"request to https://myhoast.sap.mycompany-hec.com:44300/sap/bc/cts_abapvcs/repository/mycompany-brands-sn4_git_poc/deploy?sap-client=100 returned with response 500 Internal Server Error","library":"SAP/jenkins-library","message":"step execution failed","result":"failure","stepName":"gctsDeploy","time":"2024-03-25T09:43:52.74671074-04:00"}} 2024-03-25T13:43:52.8232985Z 2024-03-25T13:43:52.8270437Z ##[error]Bash exited with code '1'. 2024-03-25T13:43:52.8286159Z ##[section]Finishing: gCTS Deploy

github-actions[bot] commented 2 months ago

Thank you for your contribution! This issue is stale because it has been open 60 days with no activity. In order to keep it open, please remove stale label or add a comment within the next 10 days. If you need a Piper team member to remove the stale label make sure to add @SAP/jenkins-library-team to your comment.

github-actions[bot] commented 1 month ago

Issue got stale and no further activity happened. It has automatically been closed. Please re-open in case you still consider it relevant.