-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
Implement repo level, user level and global environment variables support #3723
base: main
Are you sure you want to change the base?
Conversation
Hi @6543 @anbraten @qwerty287 I have done initial UI changes for this, please review the proposal and screenshots and let me know if I should continue working on this and implement the rest. Screenshots: |
As variables are not secret anyways there was a suggestion somewhere to have a special config file like |
I'd prefer this way, but it's not that easy to have a good way to implement this at org/global level. |
JFYI, how it is implemented in Gitea. |
I think this is not as useful as it seems, since you can already use variables in a workflow file. This FYI, the solution I'm proposing is heavily inspired by Gitea. |
@anbraten @qwerty287 @zc-devs |
I can also add agent variables to address #3311 |
I like the idea.
I am not a right guy :) Let's hear from maintainers.
That would be great! |
I'm really interested in this PR. Keep moving! Thanks for your work. |
6954073
to
31082b2
Compare
I have completed the code changes in the server and web frontend. This means the feature is now in a fully usable state. It would be great if someone could review the code. Summary of Changes:
|
94119dd
to
380e9e5
Compare
Wasn't there an idea to drop |
I am not aware of it. If it is just an idea without a proper discussion, maybe let's not act on that?
I have kept feature parity with secrets, to not cause confusion. If we want to remove it, wouldn't it be better to remove both Just my thoughts, let me know if we still want to remove it. |
It would be empty as you haven't explicitly added those variables in your step either by using |
As this is not a secret value, it doesn't make sense to restrict this values by a step (to me). Like you mentioned
So, I would expect it to be printed without |
That is a good point. That would make this feature much easier to use. Although, I feel that this kind of implicit behaviour might cause some confusion. It won't always be obvious where an environment variable is coming from. Also, it could be confusing for a user who has push permissions on a repo, but cannot change the repo settings. This kind of user won't be able to view where the variables are automatically getting set from. |
That is what I meant 👍
From Server or Agent 😄 I can say that about all those variables, that comes from Agent/Server :) (example) |
I understand your point, but I'm still afraid of adding this new implicit behavior. Can we get another opinion if that's okay? |
Hi maintainers, it would be great to get a review from y'all. |
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
uh damed i got requested but it fall under my todo list :? |
Review process:
|
NOTE: write into docs that it is case-sensitive |
TODO:
|
@dvjn using secrets as template is fine ... but there are a lot of copy-paste errors :/ |
If that would be the case, most of the implementation would be meaningless as then one could simply use The real value of this PR IMO lies in the possibility to (easily) set global/org-wide variables which are not sensitive. Without having to repeat them within the YAML again. Also, I am not sure if "variables" is the best wording if the values are mapped as env vars in the end. Then, it could directly be named "Environment". This might avoid confusion if there is a difference between a "variable" and an "env var". |
What?
Why?