on 2022 Nov 18 11:34 AM
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 @Former Member/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 @Former Member/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 ---
Request clarification before answering.
Thanks for getting back to me. I managed to resolve the initial issue. In the CI/CD Service UI under Jobs in my RiskManagement-Repo: risk-management-job under Stages > Build my "Build Tool Version" was set to Java 8 Node 14. Updating this parameter to Java 11 Node 14 has meant the Build action runs successfully.
HOWEVER. The Release step is now failing and giving a similar output:
2022-11-21T17:01:09.697Z] --- An error occurred in the library step: cloudFoundryDeploy
[2022-11-21T17:01:09.709Z] ----------------------------------------------------------
[2022-11-21T17:01:09.720Z]
[2022-11-21T17:01:09.731Z] The following parameters were available to the step:
[2022-11-21T17:01:09.743Z] ***
[2022-11-21T17:01:09.754Z] *** to show step parameters, set verbose:true in general pipeline configuration
[2022-11-21T17:01:09.766Z] *** WARNING: this may reveal sensitive information. ***
[2022-11-21T17:01:09.776Z] ***
[2022-11-21T17:01:09.787Z]
[2022-11-21T17:01:09.829Z] The error was:
[2022-11-21T17:01:09.840Z] ***
[2022-11-21T17:01:09.848Z] hudson.AbortException: [cloudFoundryDeploy] Step execution failed (category: undefined). Error: running command 'cf' failed: cmd.Run() failed: exit status 1
[2022-11-21T17:01:09.860Z] ***
[2022-11-21T17:01:09.871Z]
[2022-11-21T17:01:09.881Z] Further information:
[2022-11-21T17:01:09.892Z] * Documentation of library step cloudFoundryDeploy: https://sap.github.io/jenkins-library/steps/cloudFoundryDeploy/
[2022-11-21T17:01:09.903Z] * Source code of library step cloudFoundryDeploy: https://github.com/SAP/jenkins-library/blob/master/vars/cloudFoundryDeploy.groovy
[2022-11-21T17:01:09.913Z] * Library documentation: https://sap.github.io/jenkins-library/
[2022-11-21T17:01:09.923Z] * Library repository: https://github.com/SAP/jenkins-library/
[2022-11-21T17:01:09.933Z]
[2022-11-21T17:01:09.945Z] ----------------------------------------------------------
[2022-11-21T17:01:09.956Z] --- End library step of: cloudFoundryDeploy ---
[2022-11-21T17:01:10.454Z] [null] Sending telemetry data is disabled.
Just in case it is useful for this new issue too I'll post the response to the information you've requested:
The output for "cds -v":
user: risk-management $ cds -v
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
@sap/cds: 6.3.1
@sap/cds-compiler: 3.4.2
@sap/cds-dk: 6.3.1
@sap/cds-foss: 4.0.0
@sap/cds-mtx: -- missing --
@sap/eslint-plugin-cds: 2.6.0
@sap/xssec: 3.2.14
Node.js: v16.16.0
home: /home/user/projects/risk-management/node_modules/@sap/cds
risk-management: 1.0.0
Additionally my GitHub repo for this project:
https://github.com/pirateZilla/RiskManagement
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
10 | |
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.