on 2022 Nov 24 11:56 AM
Hi,
I followed the steps in the tutorial to do an automated build via CI/CD service. I tried to run the job via CI/CD cockpit to test, but it fails.
Log:
[2022-11-24T11:42:28.515Z] error mtaBuild - npm ERR! Cannot read property '@sap-cloud-sdk/http-client' of undefined [2022-11-24T11:42:28.551Z] info mtaBuild - [2022-11-24T11:42:28.586Z] error mtaBuild - npm ERR! A complete log of this run can be found in: [2022-11-24T11:42:28.622Z] error mtaBuild - npm ERR! /home/mta/.npm/_logs/2022-11-24T11_42_24_763Z-debug.log [2022-11-24T11:42:28.659Z] error mtaBuild - [2022-11-24 11:42:24] ERROR could not build the "risk-management-srv" module: could not execute the "npm clean-install --production" command: exit status 1 [2022-11-24T11:42:28.695Z] info mtaBuild - make: *** [Makefile_20221124114138.mta:37: risk-management-srv] Error 1 [2022-11-24T11:42:28.731Z] info mtaBuild - Error: could not build the MTA project: could not execute the "make -f Makefile_20221124114138.mta p=CF mtar=risk-management.mtar strict=true mode= t=\"/home/jenkins/agent/workspace/riskmanagement-job\"" command: exit status 2 [2022-11-24T11:42:28.767Z] info mtaBuild - fatal error: errorDetails{"category":"build","correlationId":"n/a","error":"running command 'mbt' failed: cmd.Run() failed: exit status 1","library":"SAP/jenkins-library","message":"failed to execute mta build","result":"failure","stepName":"mtaBuild","time":"2022-11-24T11:42:24.780906692Z"} [2022-11-24T11:42:28.802Z] fatal mtaBuild - failed to execute mta build - running command 'mbt' failed: cmd.Run() failed: exit status 1 [2022-11-24T11:42:28.838Z] info mtaBuild - persisting reports to GCS is disabled, because gcsBucketId is empty [2022-11-24T11:42:28.874Z] info mtaBuild - Step telemetry data:{"StepStartTime":"2022-11-24 11:41:38.752086498 +0000 UTC","PipelineURLHash":"50f013532a9770a2c2cfdc38b7581dd01df69b70","BuildURLHash":"50f013532a9770a2c2cfdc38b7581dd01df69b70","StageName":"Build","StepName":"mtaBuild","ErrorCode":"1","StepDuration":"46029","ErrorCategory":"build","CorrelationID":"n/a","PiperCommitHash":"e2db94dc5e9debcc618bdf706f83941e4ced0f5e","ErrorDetail":{"category":"build","correlationId":"n/a","error":"running command 'mbt' failed: cmd.Run() failed: exit status 1","library":"SAP/jenkins-library","message":"failed to execute mta build","result":"failure","stepName":"mtaBuild","time":"2022-11-24T11:42:24.780906692Z"}}
[2022-11-24T11:42:42.664Z] ---------------------------------------------------------- [2022-11-24T11:42:42.753Z] --- An error occurred in the library step: dockerExecuteOnKubernetes [2022-11-24T11:42:43.252Z] ---------------------------------------------------------- [2022-11-24T11:42:43.286Z] [2022-11-24T11:42:43.321Z] The following parameters were available to the step: [2022-11-24T11:42:43.355Z] *** [2022-11-24T11:42:43.402Z] *** to show step parameters, set verbose:true in general pipeline configuration [2022-11-24T11:42:43.437Z] *** WARNING: this may reveal sensitive information. *** [2022-11-24T11:42:43.471Z] *** [2022-11-24T11:42:43.506Z] [2022-11-24T11:42:43.540Z] The error was: [2022-11-24T11:42:43.575Z] *** [2022-11-24T11:42:43.611Z] hudson.AbortException: [mtaBuild] Step execution failed (category: build). Error: running command 'mbt' failed: cmd.Run() failed: exit status 1 [2022-11-24T11:42:43.647Z] *** [2022-11-24T11:42:43.682Z] [2022-11-24T11:42:43.719Z] Further information: [2022-11-24T11:42:43.754Z] * Documentation of library step dockerExecuteOnKubernetes: https://sap.github.io/jenkins-library/steps/dockerExecuteOnKubernetes/ [2022-11-24T11:42:43.790Z] * Source code of library step dockerExecuteOnKubernetes: https://github.com/SAP/jenkins-library/blob/master/vars/dockerExecuteOnKubernetes.groovy [2022-11-24T11:42:43.826Z] * Library documentation: https://sap.github.io/jenkins-library/ [2022-11-24T11:42:43.861Z] * Library repository: https://github.com/SAP/jenkins-library/ [2022-11-24T11:42:43.896Z] [2022-11-24T11:42:43.931Z] ----------------------------------------------------------
The build works fine when doing it manually on the BAS
Can someone help here ?
Regards
Request clarification before answering.
Many thanks, this works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @NitinMahajan,
Thank you for sharing this with us. We are glad to hear that this is solve.
I would like to ask you to use function “Answer” button to complete this question.
Please always feel free to post question related to our SAP BTP learning journeys in our SAP BTP Learning.
We are here to support you.
Kind regards,
Margit
This issues is resolved. Many thanks !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your help @Former Member!
You could also install them directly, so that they are part of your package.json. In your case, they are then only part of the build. But in this case, this is also fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.