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

Harbor overwrites changes to environment variables #109

Open
gbradley opened this issue Jul 8, 2024 · 3 comments
Open

Harbor overwrites changes to environment variables #109

gbradley opened this issue Jul 8, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@gbradley
Copy link

gbradley commented Jul 8, 2024

I'm currently having an issue where I need to modify my environment variables on a branch that I'd like previews for. On initial provision, Harbor takes the environment variables that I've defined in GitHub secrets, which is great.

However if I make a change to the environment via Forge and then push some changes to the PR, Harbor will then overwrite those changes with the ones from GitHub, meaning I have to re-edit them, restart the queue etc.

Is is possible to change the behaviour here, so when updating an existing site, Harbor gives existing variables priority?

@Hannsre
Copy link

Hannsre commented Aug 5, 2024

What we did to prevent this: We removed the updated trigger in the harbor provisioning workflow. We found there to be no reason to re-provision with harbor every time there is some code pushed to the PR.

Not exactly the solution you're looking for, but maybe it helps.

@gbradley
Copy link
Author

gbradley commented Aug 5, 2024

Thanks for the suggestion, I think you’re right - we’ll probably ignore the synchronize event in the workflow and turn on quick deploy.

@mehrancodes mehrancodes added the help wanted Extra attention is needed label Sep 1, 2024
@mehrancodes
Copy link
Owner

Hi @gbradley, maybe Harbor shouldn't touch .env after the first run. Just wondering if there's a reason someone would want to overwrite it every time

@mehrancodes mehrancodes added enhancement New feature or request and removed help wanted Extra attention is needed labels Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants