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

SAVE ARTIFACT ./* AS LOCAL not capturing all files #689

Closed
jazzdan opened this issue Jan 5, 2021 · 2 comments · Fixed by #690
Closed

SAVE ARTIFACT ./* AS LOCAL not capturing all files #689

jazzdan opened this issue Jan 5, 2021 · 2 comments · Fixed by #690
Assignees
Labels
type:bug Something isn't working

Comments

@jazzdan
Copy link
Contributor

jazzdan commented Jan 5, 2021

Repro steps

  1. git clone https://github.com/jazzdan/earthly-tons-of-artifacts.git
  2. cd earthly-tons-of-artifacts
  3. earthly +docker-setup

What I expected to happen

The Earthfile copies everything from lib in to the image (COPY lib/* .) then saves everything in the current working directory in to the out directory. out should be exactly the same as lib after earthly runs.

What actually happens

out contains a subset of files from lib:

├── out
│   ├── gdkx-autocleanups.h
│   ├── gdkx11applaunchcontext.h
│   ├── gdkx11cursor.h
│   ├── gdkx11device-core.h
│   ├── gdkx11device-xi2.h
│   ├── gdkx11device.h
│   ├── gdkx11devicemanager-core.h
│   ├── gdkx11devicemanager-xi2.h
│   ├── gdkx11devicemanager.h
│   ├── gdkx11display.h
│   ├── gdkx11displaymanager.h
│   ├── gdkx11dnd.h
│   ├── gdkx11glcontext.h
│   ├── gdkx11keys.h
│   ├── gdkx11monitor.h
│   ├── gdkx11property.h
│   ├── gdkx11screen.h
│   ├── gdkx11selection.h
│   ├── gdkx11utils.h
│   ├── gdkx11visual.h
│   └── gdkx11window.h
@dchw dchw self-assigned this Jan 5, 2021
@vladaionescu vladaionescu added the type:bug Something isn't working label Jan 5, 2021
@dchw
Copy link
Collaborator

dchw commented Jan 5, 2021

Yeah; this is weird. the trouble is that ./* ends up including subdirectories; and those end up triggering logic to remove a folder. The files you are seeing are the ones in the last subdirectory that was processed.

I've got a fix; but in the interim a workaround could be to save the whole directory as a local artifact in the last target, like this:

SAVE ARTIFACT . AS LOCAL out/standalone/

This gets you everything in the same layout thats in /usr/build. Does that help?

@jazzdan
Copy link
Contributor Author

jazzdan commented Jan 5, 2021

Thanks @dchw! The fact that there were so many files in that artifact was actually a sign that we accidentally included way too much stuff in it (including those subdirectories), so we were able to work around it by removing all those extra files.

But I figured I'd put this on your radar anyways. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants