Having repositories list into a separate json file
- Dominant language
- PHP
- Stars
- 3.3k
- Forks
- 530
- Avg merge
- 6h 53m
- Merged PRs (30d)
- 13
Description
satis.json contains some configuration settings, like the repo name, the homepage, archive configurations etc. It also contains the list of repositories/packages, which are similar to "dynamic data", not configuration.
Mixing these two things are bad when we want to install Satis via a configuration tools (ansible, puppet etc) and to update regularly the list of repositories via an other process.
For example, I install/configure Satis on my server with Ansible, which is able to generate satis.json from a template (to configure the home page etc...). I have also a web hook, called by my Gitlab instance, to add a package (if it does not exists yet) into satis.json and to launch satis to update packages.
In my case, my Ansible script cannot update satis.json without erasing the list of packages, because the list of packages is not configured into Ansible/Puppet, as it is a "dynamic" list created by an other process.
So it could be very useful if we had:
- satis.json containing only configuration settings
- satis_packages.json having only the list of repositories
The name of this last file could be setup into satis.json to add more flexibilities. For example, instead of having this satis.json:
```json
{
"name": "My Repository",
"homepage": "http://packages.example.org",
"repositories": [
{ "type": "vcs", "url": "https://github.com/mycompany/privaterepo" },
{ "type": "vcs", "url": "http://svn.example.org/private/repo" },
{ "type": "vcs", "url": "https://github.com/mycompany/privaterepo2" }
],
"require-all": true
}
```
We could have:
```json
{
"name": "My Repository",
"homepage": "http://packages.example.org",
"repositories-files": [ "satis_repositories.json"],
"require-all": true
}
```
And in satis_repositories.json:
```json
{
"repositories": [
{ "type": "vcs", "url": "https://github.com/mycompany/privaterepo" },
{ "type": "vcs", "url": "http://svn.example.org/private/repo" },
{ "type": "vcs", "url": "https://github.com/mycompany/privaterepo2" }
]
}
```
We could even mix both (and keep compatibility with old satis.json files):
```json
{
"name": "My Repository",
"homepage": "http://packages.example.org",
"repositories": [
{ "type": "vcs", "url": "https://github.com/mycompany/privaterepo3" }
],
"repositories-files": [ "satis_repositories.json"],
"require-all": true
}
```
With this feature, the repositories list can be generated by any continuous integration process, where as settings can be created by a provisionning tool (or built within a docker image), without issues.
Contributor guide
Assessment
This issue has not been assessed yet.