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

Docker repo credentials are not picked by pipeline #27

Closed T1mey closed 4 years ago

T1mey commented 4 years ago

As we're pulling the docker images from an internal artifactory we need to pull with credentials. In the MB pipeline we set a repo URL and left the label empty under config "Pipeline Model Definition".

This config has no effect on the pipeline. It falls back to https://registry-1.docker.io/v2/

Or is there another way to connect to docker repo with credentials ?

daniel-kurzynski commented 4 years ago

Do you want to pull all docker images from that repostiory?

If yes, modifying your Jenkinsfile in the following way could help:

String pipelineVersion = "master"

node {
    deleteDir()
    sh "git clone --depth 1 https://github.com/SAP/cloud-s4-sdk-pipeline.git -b ${pipelineVersion} pipelines"
    docker.withRegistry('https://registry.example.com', 'credentials-id') {
        load './pipelines/s4sdk-pipeline.groovy'
    }
}
T1mey commented 4 years ago

Thanks a lot for helping out ... that did it ;-)