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

gitops run: Use .gitignore automatically #2721

Merged
merged 1 commit into from
Sep 8, 2022
Merged

gitops run: Use .gitignore automatically #2721

merged 1 commit into from
Sep 8, 2022

Conversation

ozamosi
Copy link
Contributor

@ozamosi ozamosi commented Sep 7, 2022

Many modern tools pick up ignore files automatically - tilt for example automatically picks up your dockerignore files, and rg & fd uses your gitignore files. I chose gitignore, because we're doing gitops, not dockerops.

This is somewhat half-arsed: it doesn't pick up gitignore files in subdirectories, and it doesn't re-read the gitignore file properly.

I assume we'll need to make this optional one day, and I assume we'll need a custom .gitopsignore one day.

However until that day, this lets me run gitops run in the weave-gitops repository. The reason I need something like this is that my whole checkout is several GB, which made the upload take forever, and made flux refuse to do anything with it. Just parsing .gitignore to remove all node_modules quickly makes it "kinda" work.

Copy link
Member

@chanwit chanwit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Many modern tools pick up ignore files automatically - tilt for
example automatically picks up your dockerignore files, and rg & fd
uses your gitignore files. I chose gitignore, because we're doing
gitops, not dockerops.

This is somewhat half-arsed: it doesn't pick up gitignore files in
subdirectories, and it doesn't re-read the gitignore file properly.

I assume we'll need to make this optional one day, and I assume we'll
need a custom .gitopsignore one day.

However until that day, this lets me run `gitops run` in the
weave-gitops repository. The reason I need something like this is that
my whole checkout is several GB, which made the upload take forever,
and made flux refuse to do anything with it. Just parsing `.gitignore`
to remove all `node_modules` quickly makes it "kinda" work.

Having a node_modules directory in your application that you want to
run doesn't sound terribly unlikely, so add this for now.
@ozamosi ozamosi merged commit 520f1df into main Sep 8, 2022
@ozamosi ozamosi deleted the gitignore branch September 8, 2022 13:50
@ozamosi ozamosi added the type/enhancement New feature or request label Sep 14, 2022
This was referenced Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants