-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registry is not setup in oc:build #1537
Comments
OK @luidoc thanks for submitting this. We will investigate that problem. |
@luidoc : Thanks for reporting, I can reproduce this issue. You're right we don't seem to be considering registry provided in ImageConfiguration while doing S2I builds. We need to add logic here to append configured registry to applicableImageConfig here: Somewhat similar to what's done here: |
For completeness: When using the OpenShift Maven/Gradle Plugin the push is performed from the cluster, so you need to use follow the process described in the following video: https://www.youtube.com/watch?v=zAIARZ-efxk&t=36s Currently, our documentation for this is very poor in this aspect and should be improved. Hi @luidoc could you provide a little more context about your scenario and current workflow. For Example: |
I'm running this pipeline from a jenkins job, in a private OpenShift cluster and i need to push my image to a harbor private registry accessible by this cluster. There is a secret in the project that allows you to push to my private harbor. This cluster won't allow using its internal registry for image publication, and i also don't want my images to be saved in openshift's private registry. |
Description
When using external registry in oc:build, in the push phase it fails.
My pom:
And executing mvn clean package oc:resource oc:build -DskipTests :
If I include the name of the registry in the name of the image, it works correctly.
The documentation clearly indicates that an external registry can be specified: https://www.eclipse.org/jkube/docs/openshift-maven-plugin#registry
_If an image name doesn’t contain a registry, then by default the default Docker registry docker.io is used for push and pull operations. But this can be overwritten through various means:
If the configuration contains a subelement this registry is used.
Otherwise, a global configuration element is evaluated which can be also provided as system property via -Djkube.docker.registry._
Executing mvn clean package oc:resource oc:build -DskipTests -Djkube.docker.registry=harbor.xyz.local doesn't work either
Info
Eclipse JKube version : 1.8.0
Maven version (mvn -v) : Apache Maven 3.8.5
Red Hat OpenShift setup and version : 4.10.13
The text was updated successfully, but these errors were encountered: