Skip to content
Snippets Groups Projects
Unverified Commit 1f1c622d authored by Andrej Shadura's avatar Andrej Shadura
Browse files

Adjust README.aptly.md according to the new configuration format

parent 8f80fb07
No related branches found
No related tags found
1 merge request!72aptly: Add new repository configuration format
Pipeline #87013 passed
...@@ -22,89 +22,139 @@ configurations defined in order to use the aptly backend. ...@@ -22,89 +22,139 @@ configurations defined in order to use the aptly backend.
### aptly repositories hash ### aptly repositories hash
The OBS configuration files must provide a hash named `aptly_config` with the The OBS configuration files must provide a hash named `aptly_projects` with the
following structure: following structure:
``` ```
our $aptly_config = { our $aptly_projects = {
"prefix_path" => { "obs_project_id" => {
"distribution_name" => { "obs_repository_id" => {
"gpg-key" => "optional_gpg_hash", "target" => "repository_name",
"components" => { "distribution" => "distribution_name",
"component_name" => { "component" => "component_name",
"project" => "obs_project_id", "gpg-key" => "optional_gpg_hash",
"repository" => "obs_repository_id",
},
[...]
},
}, },
[...] [...]
}, },
[...]
}; };
``` ```
NOTE: a pair `(obs_project_id, obs_repository_id)` can only be appear once in For each `repository_name`, there must be an entry in a hash `aptly_targets`:
the hash, i.e. it can't be a component of more than one distribution.
```
our $aptly_targets = {
"repository_name" => {
"server" => {
"url" => "https://...",
"token" => "...",
},
"gpg-key" => "gpg_hash",
"prefix" => "prefix_path",
}
};
```
For example, for an Apertis v2022 release: Instead of specifying `target` and a corresponding entry in `aptly_targets`,
it’s also possible to configure the aptly endpoint directly using
`aptly-server` hash (see example below).
For example, for an Apertis v2025 release:
* publish prefix path set to: `shared/apertis/public`. * publish prefix path set to: `shared/apertis/public`.
* 3 distributions defined: `v2022`, `v2022-security`, `v2022-updates`. * 3 distributions defined: `v2025`, `v2025-security`, `v2025-updates`.
* each distribution has 3 components: `target`, `development`, `sdk`. * each distribution has 3 components: `target`, `development`, `sdk`.
* for each component, the OBS project and repository is defined. * for each component, the OBS project and repository is defined.
* as an example, `v2022` will be published using the `gpg-key` defined for this * `rebuild` repository for `sdk` is published at a separate aptly instance which
is specified inline using `aptly-server` setting.
* as an example, `v2025` will be published using the `gpg-key` defined for this
distribution. Otherwise, the default `gpg-key` is used. distribution. Otherwise, the default `gpg-key` is used.
``` ```
our $aptly_config = { my $apertis_aptly_server = {
"shared/apertis/public" => { "url" => "https://...",
"v2022" => { "token" => "...",
"gpg-key" => "8E62938108AE643A217D0511027B2E6C53229B30", };
"components" => {
"target" => { our $aptly_repos = {
"project" => "apertis:v2022:target", "apertis" => {
"repository" => "default", "server" => $apertis_aptly_server
}, "gpg-key" => $aptly_gpgkey,
"development" => { "prefix" => "shared/apertis/public",
"project" => "apertis:v2022:development", }
"repository" => "default", };
},
"sdk" => { our $aptly_projects = {
"project" => "apertis:v2022:sdk", "apertis:v2025:target" => {
"repository" => "default", "default" => {
}, "target" => "apertis",
}, "distribution" => "v2025",
"component" => "target",
}
},
"apertis:v2025:development" => {
"default" => {
"target" => "apertis",
"distribution" => "v2025",
"component" => "development",
}
},
"apertis:v2025:sdk" => {
"default" => {
"target" => "apertis",
"distribution" => "v2025",
"component" => "sdk",
}, },
"v2022-security" => { "rebuild" => {
"components" => { "distribution" => "v2025",
"target" => { "component" => "sdk",
"project" => "apertis:v2022:security:target", "gpg-key" => "...",
"repository" => "default", "prefix" => "apertis",
}, "aptly-server" => {
"development" => { "url" => "https://rebuilds.apertis.org",
"project" => "apertis:v2022:security:development", "token" => "tokentoken",
"repository" => "default",
},
"sdk" => {
"project" => "apertis:v2022:security:sdk",
"repository" => "default",
},
}, },
}, },
"v2022-updates" => { },
"components" => { "apertis:v2025:updates:target" => {
"target" => { "default" => {
"project" => "apertis:v2022:updates:target", "target" => "apertis",
"repository" => "default", "distribution" => "v2025-updates",
}, "component" => "target",
"development" => { }
"project" => "apertis:v2022:updates:development", },
"repository" => "default", "apertis:v2025:updates:development" => {
}, "default" => {
"sdk" => { "target" => "apertis",
"project" => "apertis:v2022:updates:sdk", "distribution" => "v2025-updates",
"repository" => "default", "component" => "development",
}, }
}, },
"apertis:v2025:updates:sdk" => {
"default" => {
"target" => "apertis",
"distribution" => "v2025-updates",
"component" => "sdk",
},
},
"apertis:v2025:security:target" => {
"default" => {
"target" => "apertis",
"distribution" => "v2025-security",
"component" => "target",
}
},
"apertis:v2025:security:development" => {
"default" => {
"target" => "apertis",
"distribution" => "v2025-security",
"component" => "development",
}
},
"apertis:v2025:security:sdk" => {
"default" => {
"target" => "apertis",
"distribution" => "v2025-security",
"component" => "sdk",
}, },
}, },
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment