-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Setting auth credentials from command line or environment variable #693
Comments
I guess this is similar to #116. Just FYI, copying a working |
That's what I had understood, maybe as a workaround there are "simpler" ways to generate the content of this file without using docker… but I suppose the information is not there in its raw form. |
Could you write a simple docker credential helper script that returns the appropriate environment values? You'd configure that helper with your |
@briandealwis yes, that makes total sense, thanks for the idea! |
We could also consider adding <configuration>
<to>
<image>imagename</image>
<auth>
<username>${env.REGISTRY_USERNAME}</username>
<password>${env.REGISTRY_PASSWORD}</password>
</auth>
</to>
</configuration> and be able to use |
@coollog I had something like that in mind when I opened the issue yes. Also there should be an expression (in maven lingo) associated to each of those so that one can pass it via |
Thanks @TadCordle :) |
No problem! Will be available when 0.9.8 releases. |
@victornoel version 0.9.8 is released with these features :) |
@coollog @TadCordle thanks, it works well, I just tested it. For the record, the README wasn't updated with the new options. |
Just updated it. Thanks again for your suggestions! |
In the case jib-maven-plugin is used in a CI environment, it can be useful to pass the authentication credentials directly via the command line or via environment variable.
For example with Gitlab CI, it is the case that CI jobs have environment variables with temporary tokens to push images to the Gitlab Registry.
Currently, it seems to me that the only way to take advantage of these is either via
docker login
(which means I need docker installed now) or via some hack by generating a customsettings.xml
.It would be great either to have jib-maven-plugin accept credentials via command line or to document what is the preferred way to achieve the requirement.
The text was updated successfully, but these errors were encountered: