SAP / jenkins-library

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

mtaBuild - Setting parameter Jobs has no effect #5117

Open SAPJens opened 1 week ago

SAPJens commented 1 week ago

Setting the jobs parameter for a mtaBuild seems not to work.

config.yml setting:

  mtaBuild:
    verbose: true  
    buildTarget: CF
    Jobs: 8
    dockerImage: 'devxci/mbtci-java17-node16:latest'
    publish: false

I expect that the following code is hit: https://github.com/SAP/jenkins-library/blob/a242bca1ae783884ce6c8c8ce2bf69da779590ff/cmd/mtaBuild.go#L215 and the jobs related statements are added to the call string.

However, the verbose log shows the logs below. The call "mbt build" does not contain the job related statements. How can I set the Jobs parameter?

[2024-09-24T13:34:35.463Z] [INFO][dockerExecute] Executing inside a Kubernetes Pod. Docker image: devxci/mbtci-java17-node16:latest
[2024-09-24T13:34:35.999Z] + ./piper writePipelineEnv
[2024-09-24T13:34:35.999Z] time="2024-09-24T13:34:35Z" level=info msg="Version a242bca1ae783884ce6c8c8ce2bf69da779590ff" library=SAP/jenkins-library
[2024-09-24T13:34:36.203Z] Unstash content: pipelineStepReports
[2024-09-24T13:34:36.800Z] + ./piper mtaBuild --defaultConfig .pipeline/piper-defaults.yml --ignoreCustomDefaults
[2024-09-24T13:34:36.800Z] time="2024-09-24T13:34:36Z" level=info msg="Version a242bca1ae783884ce6c8c8ce2bf69da779590ff" library=SAP/jenkins-library
[2024-09-24T13:34:36.800Z] debug mtaBuild - Trust Engine lookup skipped due to missing or incorrect configuration - no Trust Engine hook configuration found
[2024-09-24T13:34:36.800Z] debug mtaBuild - Retrieving hook configuration
[2024-09-24T13:34:36.800Z] debug mtaBuild - ConfigProvider options are not set. Provider configuration is skipped.
[2024-09-24T13:34:36.801Z] debug mtaBuild - For: STAGE_NAME, found: Central Build
[2024-09-24T13:34:36.801Z] debug mtaBuild - For: JOB_URL, found: [snip]
[2024-09-24T13:34:36.801Z] debug mtaBuild - For: BUILD_URL, found: [snip]
[2024-09-24T13:34:36.801Z] debug mtaBuild - Launching mta build
[2024-09-24T13:34:36.801Z] debug mtaBuild - Project settings file not provided via configuration.
[2024-09-24T13:34:36.801Z] debug mtaBuild - Copying file "[snip]/settings.xml" to "/usr/share/maven/conf/settings.xml"
[2024-09-24T13:34:36.801Z] debug mtaBuild - no trusted certs found / using default transport / insecure skip set to true / : continuing with existing tls config
[2024-09-24T13:34:36.801Z] debug mtaBuild - Transport timeout: 3m0s, max request duration: 0s
[2024-09-24T13:34:36.801Z] debug mtaBuild - --------------------------------
[2024-09-24T13:34:36.801Z] debug mtaBuild - --> GET request to [snip]
[2024-09-24T13:34:36.801Z] debug mtaBuild - headers: map[]
[2024-09-24T13:34:36.801Z] debug mtaBuild - cookies: 
[2024-09-24T13:34:36.801Z] debug mtaBuild - --------------------------------
[2024-09-24T13:34:36.801Z] debug mtaBuild - <-- response 200 [snip] (105.1ms)
[2024-09-24T13:34:36.801Z] debug mtaBuild - --------------------------------
[2024-09-24T13:34:36.801Z] info  mtaBuild - Successfully updated <acitveProfile> details in maven settings file : '/usr/share/maven/conf/settings.xml'
[2024-09-24T13:34:36.801Z] info  mtaBuild - running command: npm config get registry
[2024-09-24T13:34:37.061Z] info  mtaBuild - Discovered pre-configured npm registry registry with value https://registry.npmjs.org/
[2024-09-24T13:34:37.061Z] 
[2024-09-24T13:34:37.061Z] info  mtaBuild - "mta.yaml" file found in project sources
[2024-09-24T13:34:37.061Z] info  mtaBuild - No timestamp contained in "mta.yaml". File has not been modified.
[2024-09-24T13:34:37.061Z] debug mtaBuild - mtar name not provided via config. Extracting from file "mta.yaml"
[2024-09-24T13:34:37.061Z] debug mtaBuild - mtar name extracted from file "mta.yaml": "build"
[2024-09-24T13:34:37.062Z] info  mtaBuild - Executing mta build call: "mbt build --mtar build.mtar --platform CF --source ./ --target /home/jenkins/agent/workspace/prbuild --sbom-file-path sbom-gen/bom-mta.xml"