[JIRA] (JENKINS-60382) withDockerRegistry only allows one registry

1 view
Skip to first unread message

frechetta93@gmail.com (JIRA)

unread,
Dec 5, 2019, 1:39:03 PM12/5/19
to jenkinsc...@googlegroups.com
Eric Frechette created an issue
 
Jenkins / Improvement JENKINS-60382
withDockerRegistry only allows one registry
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: docker-workflow-plugin
Created: 2019-12-05 18:38
Environment: Jenkins v2.176.3
docker-workflow plugin v1.21
Labels: docker docker-workflow-plugin plugin registry
Priority: Minor Minor
Reporter: Eric Frechette

I have a script that requires two Docker registries (build image1, push to registry 1, build image2 that relies on image1, push to registry 2).

I am unable to authenticate with two registries at once using withDockerRegistry. withDockerRegistry only takes one registry argument and if you attempt to nest withDockerRegistry steps, only the innermost registry is authenticated with.

This doesn't work (only registry2 works):

withDockerRegistry(<registry1>) {
    withDockerRegistry(<registry2>) {
        sh `my-script.sh`
    }
}

withDockerRegistry should take an arbitrary amount of registries as arguments:

withDockerRegistry([<registry1>, <registry2>]) {
    sh 'my-script.sh'
}
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages