-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Jib and Gradle rebuild with arbitrary file change. #3457
Comments
Yeah this isn't currently possible mostly because jib can't know how those files are getting there. I think it makes sense for us to add a |
we could also address this by adding support for a trigger file. see #1954 |
I agree that something here would be interesting. Now Jib itself is providing dependencies automatically currently (based on maven src, resources definitions), similar to Docker builder (we calculate it based COPY and ADD commands) that's why we didn't have that here in the first place. I'm thinking about calling this @nkubala WDYT? We'll also need a mini design doc here to explore the cases when these overlap with jib dependencies and/or sync definitions. |
@balopat that seems fine. it might be nice to somehow say these are files and not "triggers" themselves, though now we're getting pretty verbose so I'm not sure it matters much. I'd love to see a small design writeup here if anyone is interested! |
@balopat @nkubala For many projects Jib plugin makes a decent job but there are special use cases. I've encountered one of them with a module utilizing generated resources. Current implementation has two drawbacks:
So my design suggestion is to have same style Another option would be to handle that in Jib itself but it's Skaffold-specific configuration anyways and having it in |
@lightoze is your generated resources folder in the build directory?
|
@loosebazooka yes it is in build directory. Also generated sources probably will cause the same problem. |
@lightoze I think this is better solved on the jib side -- in the linked proposal: GoogleContainerTools/jib#2290 |
@loosebazooka ultimately either way is fine for me. Having it on jib side is much more flexible, though. |
I would probably actually prefer it happens on the jib side. |
@lightoze any chance you can try out this branch? GoogleContainerTools/jib#2292 |
Expected behavior
I have a series of custom gradle tasks that leverage different built-in tasks. It goes something like this:
assemble -> tar (custom) -> copy (custom) -> jib*
I'm leveraging Jib to easily containerize/serve my JavaScript using an
nginx:latest
image.Everything works great, but I'd like to be able to trigger a skaffold rebuild when I change a non-Java related file under my gradle project.
For example:
My copy tasks takes an Nginx config from my project's
nginx/default.conf
and preps it intobuild/jib-extra-dir/...
along with my exploded web content bundle.I'd like to be able to trigger a skaffold deployment when something in
default.conf
or mytar.gz
changes.Is there a way to accomplish this via the
skaffold.yaml
?I noticed other types of build artifacts (e.g. -
buildpack
) offer adependencies:
section which:Why is it that
jib
artifacts do not also have this feature?Actual behavior
Changes to Nginx config file don't redeploy my client container.
Information
The text was updated successfully, but these errors were encountered: