Skip to content
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

DockerTasks should use registry from DockerPluginExtension #131

Open
pjweisberg opened this issue Jan 19, 2018 · 1 comment
Open

DockerTasks should use registry from DockerPluginExtension #131

pjweisberg opened this issue Jan 19, 2018 · 1 comment
Labels

Comments

@pjweisberg
Copy link

DockerTasks have properties that correspond to all the properties in DockerPluginExtension, and it seems to treat all of them as defaults that can be overridden by a specific task, with the exception of registry. Images aren't tagged with the registry URL unless specified in the individual tasks.

registry should be treated the same as the other properties: as a default for the tasks to inherit.

@pjweisberg
Copy link
Author

I just realized that getRegistry() does return the "default" value as I expected. The problem is getDefaultImageTag() uses registry directly instead of calling getRegistry().

I can actually work around it by adding this line to my build.gradle:

project.tasks.withType(DockerTask).each { it.registry = it.registry }

There's an evil part of me that's thinking of leaving it in my build file without a comment, as a puzzle for future developers.

@bjornmagnusson bjornmagnusson self-assigned this May 9, 2018
@bjornmagnusson bjornmagnusson removed their assignment Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants