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

Decouple from cwd #1067

Open
avoidik opened this issue Dec 29, 2023 · 2 comments · May be fixed by #1360
Open

Decouple from cwd #1067

avoidik opened this issue Dec 29, 2023 · 2 comments · May be fixed by #1360
Labels
nice Down prioritized

Comments

@avoidik
Copy link

avoidik commented Dec 29, 2023

Is your feature request related to a problem? Please describe.

I would like to keep all gitlab-ci-local related data outside of my git projects, completely separate. Which seems to be an impossible goal due to the common pattern to bind almost all path operations to the cwd (${cwd}/${stateDir}/..., ${cwd}/${file}, git, etc.).

Describe the solution you'd like

I would like to have an option to be able to decouple from the cwd. The idea here is that GCL should take only a source code from the particular directory I could have specified, while everything else, like dotfiles, variables.yaml, stateDir, even gitlab-ci-local.yml itself, sits in another directory, outside of a git project. Something like --git-dir CLI option, maybe.

Describe alternatives you've considered

I was trying to combine different CLI options (--home, --state-dir, --cwd, --file) in attempt to achieve what I want, but I was unable to do so.

Additional context

N/A

@firecow firecow added the nice Down prioritized label Dec 29, 2023
@firecow
Copy link
Owner

firecow commented Dec 29, 2023

We could implement code that allows --state-dir to be an absolute path...

Would that be sufficient for your use case?

gitlab-ci-local --state-dir /home/me/project35-gitlab-ci-local

@avoidik
Copy link
Author

avoidik commented Dec 29, 2023

It looks good to me, I guess if we are going to follow this pattern the --file CLI should be also able to accept absolute path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nice Down prioritized
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants