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

Allow overriding .gitignore for job copies of files that contain secrets #1220

Open
ricklamers opened this issue Aug 23, 2022 · 1 comment
Open
Labels
improvement An improvement or enhancement to an existing feature.

Comments

@ricklamers
Copy link
Member

Describe the problem this improvement solves
When working with files to store credentials you typically include the paths to these folders/files in .gitignore files.

When a job is created a snapshot of the project files is created too that excludes everything in the .gitignore. This is usually a good thing since it can avoid copying unnecessary "cache" files like virtualenvs or node_modules/ or pycache folders. However, it would be nice if there was a simple way to tell it to override the .gitignore for certain files that you don't want to version with git but that you would like to have present in the job snapshot. E.g. a JSON credentials file.

Describe the solution you'd like
Initially I was thinking of something like a .orchestignore that can undo .gitignore using the same expressivity of a .gitignore file. E.g. using the negation operator. However, I'm not sure if that's convoluted and whether there's a cleaner approach to be found here.

@ricklamers ricklamers added the improvement An improvement or enhancement to an existing feature. label Aug 23, 2022
@astrojuanlu
Copy link
Contributor

This. Secrets stored in files are pretty common at least in Google Cloud. What I've done some times is to pipe the contents of the file to an environment variable and then have some extra machinery that loads that and writes it to disk (internal Slack) but it's pretty cumbersome.

.orchestignore, similar to .dockerignore, sounds like a good solution. I'd decouple it from .gitignore though, and just populate it with some good defaults.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement An improvement or enhancement to an existing feature.
Projects
None yet
Development

No branches or pull requests

2 participants