resticprofile
resticprofile copied to clipboard
Allow overriding "default-command" in profile
Add "default-command" from global
also to the profile sections.
This allows to create profiles (and group of such profiles) for special cases, e.g. like check
or prune
:
groups:
prune-all: ["prune-repo1", ...]
prune-repo1:
inherit: "repo1"
default-command: "prune"
prune:
schedule: "daily"
...
The example above can be run with resticprofile -n prune-all
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.2% Duplication
Codecov Report
Merging #64 (6308eeb) into master (245a440) will decrease coverage by
0.10%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## master #64 +/- ##
==========================================
- Coverage 60.63% 60.52% -0.11%
==========================================
Files 60 60
Lines 4623 4631 +8
==========================================
Hits 2803 2803
- Misses 1621 1629 +8
Partials 199 199
Impacted Files | Coverage Δ | |
---|---|---|
config/profile.go | 91.25% <ø> (ø) |
|
main.go | 0.83% <0.00%> (-0.03%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 245a440...6308eeb. Read the comment docs.
This is one way of doing it, while keeping the groups
section the way it is, which is fine.
Also, I have been thinking about the groups configuration for a while, and I clearly overlooked it when I did it. At some point I would like to change it so we can configure options inside a group, the most obvious would be to be able to schedule a group.
In which case, default command would fit nicely in a group configuration.
Now I don't mind adding a default command per profile though
Having "default-command" in a group is also a good thing. Priority wise it's just a question what comes first when we have gobal
, group
and profile
. When it is added to groups as well it is probably best to prioritise group
, otherwise profiles with a "default-command" cannot be added to groups that are built for scheduling a particular purpose.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication