-
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
Convert Gradle config parameters (such as jib.container.labels) to use lazy evaluation #3094
Comments
Thanks for your feedback! Given the use case, I think making labels (among other parameters) lazily configurable will be very useful. We also welcome contributions. Technical notes:
|
As an immediate workaround, I wonder if setting |
Hello I would like to help with this issue |
@NaitYoussef thanks for your interest! As noted in #3094 (comment),
the way we decided to expose Gradle properties is to use This GitHub issue is about |
Fixed by #3242. |
@remy-tiitre @ChristianCiach @NaitYoussef Jib 3.1.1 is released with this support. Let us know if it doesn't work. |
@chanseokoh I believe you meant Fixed by #3242? It might be worth mentioning somewhere that this can cause a breakage if using a Kotlin based build.gradle, causing a |
@jamesdh I guess you'll have to use |
Just like there was an issue to make the jib.to.tags and jib.to.auth to be lazyly evaluated I would need to have the container.labels do the same. Even the reason is the same. I use com.gorylenko.gradle-git-properties Gradle plugin and would like to reuse its properties to add labels to my images. Something like that:
In our case I would make that configuration global and add this snipped to our custom gradle wrapper init script.
I did try something like this:
But this errored out with this message:
> class org.codehaus.groovy.runtime.GStringImpl cannot be cast to class java.lang.String (org.codehaus.groovy.runtime.GStringImpl is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @47c62251; java.lang.String is in module java.base of loader 'bootstrap')
The text was updated successfully, but these errors were encountered: