SAP-archive / cloud-s4-sdk-pipeline

The Cloud SDK pipeline uses the Cloud SDK continuous delivery server for building, checking, and deploying extension applications. Projects based on the SAP Cloud SDK archetype will automatically use this pipeline.
Apache License 2.0
65 stars 25 forks source link

How to specify Maven repository in mtaBuild step? #21

Closed Wesley-Qi closed 5 years ago

Wesley-Qi commented 5 years ago

Hi colleagues,

I have a question regarding our pipeline setting.

We configured 'mavenExecute' and 'mtaBuild' steps. In 'mavenExecute', we specified a prepared settings.xml by relative path, in it we specified nexus servers as Maven repositories. However, during build, it's found that the mtaBuild didn't download dependencies from Maven repositories specified in settings.xml, but tried to download from: 'https://repo.maven.apache.org/maven2', and therefore many dependencies are missed and mtaBuild failed.

Why mtaBuild didn't share configurations of settings.xml? Does mtaBuild have its own repo configuration?

Below are related settings in pipeline_config: steps: mavenExecute: dockerImage: maven:3.5-jdk-8-alpine projectSettingsFile: './settings.xml' mtaBuild: dockerImage: 'ppiper/mta-archive-builder'

Below is part of console logs of the failed job:

Log entry has been removed due to sensitive information

Can you help give some advice?

If any info is required, just let me know.

Thanks so much!

Best, Terry

fgeck commented 5 years ago

Hi Terry,

thank you for reporting that issue and we have to enhance our conifguration.md to make that more clear. To use your configured maven repo URL in the mtaBuild step is possible if you configure it in this step. Example:

steps:
  mtaBuild:
    projectSettingsFile: 'my-settings.xml'

For more information please visit the documentation of the mtaBuild step which you can find here: https://sap.github.io/jenkins-library/steps/mtaBuild/

Best regards Florian