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

Custom/Buildpack builders should support glob patterns for dependencies #3826

Closed
dsyer opened this issue Mar 13, 2020 · 1 comment · Fixed by #3878
Closed

Custom/Buildpack builders should support glob patterns for dependencies #3826

dsyer opened this issue Mar 13, 2020 · 1 comment · Fixed by #3878
Assignees

Comments

@dsyer
Copy link

dsyer commented Mar 13, 2020

Here's the example in the docs:

custom:
  buildCommand: ./build.sh
  dependencies:
    paths:
    - pkg/**
    - src/*.go
    ignore:
    - vendor/**

When I do that I get "... stating file pkg/**: no such file or directory" and skaffold crashes. It works for me with just the directory. Is that expected? If so, maybe it should be reflected in the docs.

@balopat balopat added kind/bug Something isn't working meta/examples area/docs and removed kind/bug Something isn't working labels Mar 25, 2020
@balopat
Copy link
Contributor

balopat commented Mar 25, 2020

Thank you Dave for opening the issue!
We are talking about https://skaffold.dev/docs/pipeline-stages/builders/custom/#paths-and-ignore, right?

Yeah, this is a mistake - dependencies don't support glob patterns yet - but they should - because funnily enough, the same function is used for Dockerfile dependency calculation that is derived from the COPY commands. However glob patterns work there! So, the real issue is that when we implemented the custom builder and the buildpack builder also (!) we missed the glob expansion logic!

I'll rename this bug to reflect the bug. We should support glob patterns in custom/buildpack dependencies.

cc @dgageot

@balopat balopat changed the title Custom Build Script docs show example of glob pattern for dependencies that don't work Custom/Buildpack builders should support glob patterns for dependencies Mar 25, 2020
@dgageot dgageot self-assigned this Mar 26, 2020
dgageot added a commit to dgageot/skaffold that referenced this issue Mar 26, 2020
Fixes GoogleContainerTools#3826

Signed-off-by: David Gageot <david@gageot.net>
dgageot added a commit to dgageot/skaffold that referenced this issue Mar 26, 2020
Fixes GoogleContainerTools#3826

Signed-off-by: David Gageot <david@gageot.net>
dgageot added a commit to dgageot/skaffold that referenced this issue Mar 30, 2020
Fixes GoogleContainerTools#3826

Signed-off-by: David Gageot <david@gageot.net>
dgageot added a commit that referenced this issue Mar 30, 2020
Fixes #3826

Signed-off-by: David Gageot <david@gageot.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants