Add config to change default pipeline config paths and extensions#6580
Conversation
Signed-off-by: jolheiser <git@jolheiser.com>
|
I would not change that constant, rather add a new field to |
Signed-off-by: jolheiser <git@jolheiser.com>
b520343 to
225cd68
Compare
|
Alright, moved to |
|
beside cli this looks good :) |
Signed-off-by: jolheiser <git@jolheiser.com>
Signed-off-by: jolheiser <git@jolheiser.com>
|
Still seems to have an import cycle in forge, but I am less sure how to deal with this one. |
|
Open to suggestions here, a572dd8 was fairly simple albeit a bit hacky. Seems that moving it to server means plumbing it through as extra args to avoid import cycles unless there is a better alternative I'm not seeing. |
|
Not sure, but in the ui we show the default values if the field is empty, right? This would be wrong if the config is changed. |
|
Hm, yes it would be. The translation could be changed to just that prefix "By default:" and then dynamically create the "x -> y -> z" although it may get too long depending on how it's set. |
|
can you also copy tje new flag to cli exec? https://github.com/woodpecker-ci/woodpecker/blob/main/cli/exec/flags.go |
I think that's OK, it's unlikely that someone will set hundreds of files there. |
|
just thunking ... if you wana have jsonnet and multiworkflow files ... this patcher do not work, you we also need to be able to change file extensions we do filter upon |
|
This patch would work, because it parses out extensions bases on the paths given. I can update the translation, however I still have the issue that all the things I've tried after moving to |
|
Which import cycles? This should not happen at all I think. Where do you want to use the configs? In packages like api etc. this shouldn't give you import cycles. I think for the file extensions I would actually prefer a separate env var to configure that instead of inferring from the paths. |
|
https://ci.woodpecker-ci.org/repos/3780/pipeline/34580/10
|
|
Surge PR preview deployment was removed |
|
Ah I see, then we probably should not store that globally. The services indeed shouldn't use the global config. Maybe you could store the config diretly in the |
Signed-off-by: jolheiser <git@jolheiser.com>
|
@6543 you wanted to add this to the cli as well, right? Beside that also lgtm. |
6543
left a comment
There was a problem hiding this comment.
thx yes cli should also have this flag ...
also test fails ...
Signed-off-by: jolheiser <git@jolheiser.com>
|
afaict the |
Signed-off-by: jolheiser <git@jolheiser.com>
aww ... in this case we can wait till we have a proper exec ... I'm currently refactoring the bases to make it work propperly anyway |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6580 +/- ##
==========================================
+ Coverage 41.60% 41.71% +0.11%
==========================================
Files 432 433 +1
Lines 28805 28889 +84
==========================================
+ Hits 11983 12050 +67
- Misses 15747 15751 +4
- Partials 1075 1088 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Based on discussion from #6576
It feels awkward to set a variable in a package called
constant😅But this seemed like the least intrusive way to make this change without having to push the CLI flag all around in a bigger refactor.
closes #5428