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

Add support for ini file. #363

Closed
wants to merge 1 commit into from
Closed

Conversation

lahabana
Copy link

Motivation:

In CI we have multiple invocations of muffet with mostly the same arguments.
This is cumbersome to maintain all the other args.
Thus we'd like to have support for a config file to use as default

Implementation:

Always use muffet.ini. I thought it was likely unecessary to support
anything different until the need comes for it.

Signed-off-by: Charly Molter [email protected]

Motivation:

In CI we have multiple invocations of muffet with mostly the same arguments.
This is cumbersome to maintain all the other args.
Thus we'd like to have support for a config file to use as default

Implementation:

Always use `muffet.ini`. I thought it was likely unecessary to support
anything different until the need comes for it.

Signed-off-by: Charly Molter <[email protected]>
@raviqqe
Copy link
Owner

raviqqe commented Feb 14, 2024

Hi. Thank you for the PR!

What OS do you use on CI? In your use cases, are scripts (shell scripts or batch files) not sufficient?

@lahabana
Copy link
Author

It's all github actions:

https://github.com/kumahq/kuma-website/blob/b2087d57def4e5fa48cba9e2bded495315dbf59c/.github/workflows/ci.yml#L45-L77

We could make it a bash script but as you can see there's no checkout so we'd end up creating the bash file and then running it. It could work or we could have a config file like I'm adding here.

In any case it's your repo if you don't feel you need the added complexity of ini files feel free to close :)

PS: another alternative I thought about was EnvVars but this was tricky for repeated args (like include/exclude for example). Let me know if you prefer this/have a different idea.

@raviqqe
Copy link
Owner

raviqqe commented Feb 19, 2024

We could make it a bash script but as you can see there's no checkout so we'd end up creating the bash file and then running it. It could work or we could have a config file like I'm adding here.

Sorry, I think I still don't understand how you want to use this feature. 😅 How do you put the .ini file into the CI jobs?

@lahabana
Copy link
Author

I think we'd probably put a echo 'INI_CONTENT' > muffet.ini

@raviqqe
Copy link
Owner

raviqqe commented Feb 23, 2024

Let's discuss this first in an issue! #365

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 87.60%. Comparing base (61d5451) to head (a948e22).
Report is 56 commits behind head on main.

Files with missing lines Patch % Lines
arguments.go 75.00% 1 Missing and 1 partial ⚠️
command.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #363      +/-   ##
==========================================
+ Coverage   87.50%   87.60%   +0.10%     
==========================================
  Files          30       30              
  Lines         872      702     -170     
==========================================
- Hits          763      615     -148     
+ Misses         88       64      -24     
- Partials       21       23       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

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

Successfully merging this pull request may close these issues.

2 participants