cancel
Showing results for 
Search instead for 
Did you mean: 
A New Home in the New Year for SAP Community!

Building side-by-side extensions on SAP BTP - Configuring a CI/CD Job - deployment issues

declanmoore
Employee
Employee
0 Kudos

Currently going through the Building side-by-side extensions on SAP BTP Learning Journey and I'm at the Configuring a CI/CD Job step and running into an issue when I trigger my risk-management-job manually or through a commit in the CI/CD Service.

The error is on the Build step of the pipeline.

 

 

[2022-11-17T12:14:44.789Z] info  mtaBuild -   Node.js v14.18.0 or higher is required for @SAP/cds.
[2022-11-17T12:14:44.802Z] info  mtaBuild -   Current v14.17 does not satisfy this.
[2022-11-17T12:14:44.814Z] info  mtaBuild -   
[2022-11-17T12:14:44.824Z] error mtaBuild - ........................[2022-11-17 12:14:42] ERROR the "before-all"" build failed: could not execute the "npx -p @SAP/cds-dk cds build --production" command: exit status 1
[2022-11-17T12:14:44.836Z] info  mtaBuild - make: *** [Makefile_20221117121417.mta:28: pre_build] Error 1
[2022-11-17T12:14:44.847Z] info  mtaBuild - Error: could not build the MTA project: could not execute the "make -f Makefile_20221117121417.mta p=CF mtar=risk-management.mtar strict=true mode= t=\"/home/jenkins/agent/workspace/risk-management-job\"" command: exit status 2
[2022-11-17T12:14:44.858Z] 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-17T12:14:42.612575383Z"}
[2022-11-17T12:14:44.870Z] fatal mtaBuild - failed to execute mta build - running command 'mbt' failed: cmd.Run() failed: exit status 1
[2022-11-17T12:14:44.882Z] info  mtaBuild - persisting reports to GCS is disabled, because gcsBucketId is empty
[2022-11-17T12:14:44.893Z] info  mtaBuild - Step telemetry data:{"StepStartTime":"2022-11-17 12:14:17.472775503 +0000 UTC","PipelineURLHash":"50f013532a9770a2c2cfdc38b7581dd01df69b70","BuildURLHash":"50f013532a9770a2c2cfdc38b7581dd01df69b70","StageName":"Build","StepName":"mtaBuild","ErrorCode":"1","StepDuration":"25140","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-17T12:14:42.612575383Z"}}
[2022-11-17T12:14:46.075Z] + ./piper readPipelineEnv
[2022-11-17T12:14:46.227Z] Transfer Influx data
[2022-11-17T12:14:46.370Z] Stashed 0 file(s)
[2022-11-17T12:14:53.062Z] Stashed 67 file(s)
[2022-11-17T12:14:55.789Z] invalidate stash container-05afbd6e-3124-46ee-8e87-3487d9e70905
[2022-11-17T12:14:55.853Z] Warning: overwriting stash ‘container-05afbd6e-3124-46ee-8e87-3487d9e70905’
[2022-11-17T12:14:55.874Z] Stashed 0 file(s)
[2022-11-17T12:14:56.497Z] ----------------------------------------------------------
[2022-11-17T12:14:57.080Z] --- An error occurred in the library step: dockerExecuteOnKubernetes
[2022-11-17T12:14:57.093Z] ----------------------------------------------------------
[2022-11-17T12:14:57.105Z] 
[2022-11-17T12:14:57.116Z] The following parameters were available to the step:
[2022-11-17T12:14:57.127Z] ***
[2022-11-17T12:14:57.140Z] *** to show step parameters, set verbose:true in general pipeline configuration
[2022-11-17T12:14:57.157Z] *** WARNING: this may reveal sensitive information. ***
[2022-11-17T12:14:57.167Z] ***
[2022-11-17T12:14:57.177Z] 
[2022-11-17T12:14:57.187Z] The error was:
[2022-11-17T12:14:57.198Z] ***
[2022-11-17T12:14:57.210Z] hudson.AbortException: [mtaBuild] Step execution failed (category: build). Error: running command 'mbt' failed: cmd.Run() failed: exit status 1
[2022-11-17T12:14:57.227Z] ***
[2022-11-17T12:14:57.242Z] 
[2022-11-17T12:14:57.255Z] Further information:
[2022-11-17T12:14:57.265Z] * Documentation of library step dockerExecuteOnKubernetes: https://sap.github.io/jenkins-library/steps/dockerExecuteOnKubernetes/
[2022-11-17T12:14:57.275Z] * Source code of library step dockerExecuteOnKubernetes: https://github.com/SAP/jenkins-library/blob/master/vars/dockerExecuteOnKubernetes.groovy
[2022-11-17T12:14:57.287Z] * Library documentation: https://sap.github.io/jenkins-library/
[2022-11-17T12:14:57.298Z] * Library repository: https://github.com/SAP/jenkins-library/
[2022-11-17T12:14:57.309Z] 
[2022-11-17T12:14:57.319Z] ----------------------------------------------------------
[2022-11-17T12:14:57.331Z] --- End library step of: dockerExecuteOnKubernetes ---

 

 

Answers (1)

Answers (1)

markushaug
Employee
Employee

Hi @declanmoore ,

which cds version are you using? You get it by using "cds -v" into your terminal. Please provide the entire output.

And please also share your entire project via GitHub or at least your mta.yaml file here.

Thanks,
Markus

 

declanmoore
Employee

@markushaug

I managed to get the issues resolved.

The problem with my Build Stage was due to the Build Tool Version - once set manually to Java 11 Node 14 it worked.

 

And then my follow up issue with the Release was resolved by turning on my HANA Db - which I believed was running due to the green box in the cockpit for "Created" within my Space, as opposed to opening the Management for HANA.

So everything working now. Thanks for the assistance. This issue can be closed.

0