jenkinsci / jenkinsci/docker-workflow-plugin

[JENKINS-58837] withDockerRegistry on multiple clusters

Open
#622 5 comments 0 reactions 0 assignees View on GitHub
component:docker-commons-plugin component:docker-workflow-plugin component:openshift-client-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
527
Forks
422
Avg merge
10m
Merged PRs (30d)
1

Description

Following instructions on https://github.com/openshift/jenkins-client-plugin#moving-images-cluster-to-cluster, I am unable to promote the image between two openshift clusters as it throws an authentication issue.

Adding a sleep after the two withDockerRegistry calls, I can see that two folders are created under the @​TMP directory (unique names for each) with a config.json under each of them - these contain the authentication details to the respective registries.

 

Docker-commons-plugin version: 1.15

Docker plugin version: 1.1.7

Openshift Client plugin version: 1.0.31 (openshift client and docker registry version: 3.7.119)

Jenkins: 2.176.2

 

[Pipeline] { (Copy from source to dest)

[Pipeline] script
[Pipeline] {
[Pipeline] withDockerRegistry
$ docker login -u openshift/skopeo -p ******** https://docker-registry-default.
Login Succeeded
[Pipeline] {
[Pipeline] withDockerRegistry
$ docker login -u ci-cd/jenkins -p ******** https://docker-registry.
Login Succeeded
[Pipeline] {
[Pipeline] sh
+ /bin/oc image mirror --insecure=true docker-registry./appversion/appversion:latest docker-registry-default./appversion/appversion:latest
error: unable to retrieve source image docker-registry./appversion/appversion by tag: unauthorized: authentication required
[Pipeline] }
[Pipeline] // withDockerRegistry
[Pipeline] }
[Pipeline] // withDockerRegistry
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE

---
Originally reported by clarkster, imported from: withDockerRegistry on multiple clusters


  • status: Open
  • priority: Minor
  • component(s): docker-commons-plugin, docker-workflow-plugin, openshift-client-plugin
  • resolution: Unresolved
  • votes: 2
  • watchers: 5
  • imported: 2025-12-07

Raw content of original issue

Following instructions on https://github.com/openshift/jenkins-client-plugin#moving-images-cluster-to-cluster, I am unable to promote the image between two openshift clusters as it throws an authentication issue.

Adding a sleep after the two withDockerRegistry calls, I can see that two folders are created under the <jobname>@TMP directory (unique names for each) with a config.json under each of them - these contain the authentication details to the respective registries.

 

Docker-commons-plugin version: 1.15

Docker plugin version: 1.1.7

Openshift Client plugin version: 1.0.31 (openshift client and docker registry version: 3.7.119)

Jenkins: 2.176.2

 



[Pipeline] { (Copy from source to dest)

[Pipeline] script
[Pipeline] {
[Pipeline] withDockerRegistry
$ docker login -u openshift/skopeo -p ******** https://docker-registry-default.<redacted>
Login Succeeded
[Pipeline] {
[Pipeline] withDockerRegistry
$ docker login -u ci-cd/jenkins -p ******** https://docker-registry.<redacted>
Login Succeeded
[Pipeline] {
[Pipeline] sh
+ /bin/oc image mirror --insecure=true docker-registry.<redacted>/appversion/appversion:latest docker-registry-default.<redacted>/appversion/appversion:latest
error: unable to retrieve source image docker-registry.<redacted>/appversion/appversion by tag: unauthorized: authentication required
[Pipeline] }
[Pipeline] // withDockerRegistry
[Pipeline] }
[Pipeline] // withDockerRegistry
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.