-
Notifications
You must be signed in to change notification settings - Fork 10
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
Added Docker Pipeline example to README.md #2
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very useful, thanks. There is literally no documentation on this anywhere but here (and this https://stackoverflow.com/questions/45800883/jenkins-pipeline-build-with-docker-google-registry-and-google-auth-plugin).
Please merge.
I created https://issues.jenkins-ci.org/browse/JENKINS-49452 to try and get some attention to this. |
Got burned by this lack of documentation yesterday. |
Is this plugin still maintained? Its functionality is crucial for those of us who rely on the GCloud's container registry, which doesn't really allow for simple username/password authentication (unless I missed that point in the documentation somehow). The last version is 5 years old and although there are many Jenkins plugins and components which do not receive updates for long time and work just fine, this one is entirely new level - even the small, non-breaking yet important documentation mentions like that one are stalled for 4 years already. What if compatibility issue with newer Jenkins version appears, or even worse - some security issue? I saw some examples of what Google posted in their repo, but these "best practices" of publishing container image to GCR using Kaniko is not something I'd call that - it looks more like a dirty workaround or a weird attempt of trying to show the functionalities of the mentioned plugins, without really taking reasonability into consideration. Not to mentions that these "best practices" are not necessarily fresh either, dating back to 2019. Not trying to complain here, just wondering - doesn't this plugin quality for being marked for adoption? Right now there are plugins for adoption in Jenkins repository which receive more love than this one does. Should the original maintainer be contacted first for that or is it prerogative of main Jenkins team? |
@craigdbarber @stephenashank @GoogleCloudPlatform is this plugin still maintained by Google? This plugin is currently broken with Jenkins 2.266+ including the latest Jenkins LTS 2.277.1. |
For some reason I couldn't make this plugin work for me, even after adding gcr: prefix to the credential name. However, I noticed that during pipeline execution it calls docker.withRegistry('https://eu.gcr.io', 'usernamePasswordCredentials') {
// doing my docker stuff
} Jenkins will then issue Hope this helps somebody. 🙂 |
Thanks @Konpon96 . There is also a similar option to use the json key authentication with Artifact Registry. https://cloud.google.com/artifact-registry/docs/docker/authentication It's probably preferable to use |
The possibility to use base64 with Artifact Registry for encoding the key is actually one of its many benefits over GCR, but I'm yet to migrate to it in my projects. I actually gave it a try and used |
I spend the better part of a day not realizing that the
gcr:
prefix needed to be in the pipeline file. During that time I must have read this doc a dozen times.Hoping this quick addition to the doc will save someone else the frustration.