Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
apertis-website
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docs
apertis-website
Merge requests
!438
Draft: apt-publisher: Add notes about OBS aptly integrations tests
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Draft: apt-publisher: Add notes about OBS aptly integrations tests
wip/adalessandro/apt-publisher-aptly-tests
into
master
Overview
1
Commits
1
Pipelines
4
Changes
1
Closed
Ariel D'Alessandro
requested to merge
wip/adalessandro/apt-publisher-aptly-tests
into
master
2 years ago
Overview
1
Commits
1
Pipelines
4
Changes
1
Expand
Task
https://phabricator.apertis.org/T8672
Edited
2 years ago
by
Ariel D'Alessandro
0
0
Merge request reports
Compare
master
version 3
ae20722e
2 years ago
version 2
3102a5d5
2 years ago
version 1
8ad46424
2 years ago
master (base)
and
latest version
latest version
cd057dfb
1 commit,
2 years ago
version 3
ae20722e
1 commit,
2 years ago
version 2
3102a5d5
1 commit,
2 years ago
version 1
8ad46424
1 commit,
2 years ago
1 file
+
114
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
content/concepts/apt-publisher.md
+
114
−
0
Options
@@ -192,3 +192,117 @@ and/or replaced with a different project are therefore very low.
*
Automate periodic database cleanups
*
Add configuration options for publishing to cloud-based storage
*
Implement cloud-based storage options for
`aptly`
's internal package pool
# Testing
## Configuration requirements
*
Make sure the required environments variables are properly set as follows
(default values are shown here):
```
$ export GNUPGHOME=/srv/obs/gnupg
$ export OBS_FRONTEND_HOST=obs-frontend
```
*
Add the following configuration to
`/etc/obs/BSConfig.pm`
, setting the
`gpg-key`
configuration to a valid GPG key:
```
my @reprepro_releases = ("v2022");
my @aptly_releases = ("v2023");
my @apertis_components = ("target", "development", "sdk");
my $apertis_prefix = "shared/apertis/public/apertis";
our $publishedhook_use_regex = 1;
our $publishedhook = {};
our $aptly_defconfig = {
"gpg-key" => "D4B4146191456112D814554C1DB3714017240E34",
};
foreach $release (@reprepro_releases) {
$publishedhook->{"apertis:".$release.":.*"} = "/usr/lib/obs/server/reprepro-snapshot";
};
foreach $release (@aptly_releases) {
$publishedhook->{"apertis:".$release.":.*"} = "/usr/lib/obs/server/bs_published_hook_aptly_snapshot";
};
our $reprepository = {};
foreach $release (@reprepro_releases) {
foreach $component (@apertis_components) {
$reprepository->{"apertis:".$release.":".$component."/default"} = {
"repository" => $apertis_prefix,
"codename" => $release,
"component" => $component
};
$reprepository->{"apertis:".$release.":updates:".$component."/default"} = {
"repository" => $apertis_prefix,
"codename" => $release."-updates",
"component" => $component
};
$reprepository->{"apertis:".$release.":security:".$component."/default"} = {
"repository" => $apertis_prefix,
"codename" => $release."-security",
"component" => $component
};
};
};
our $aptly_config = {};
foreach $release (@aptly_releases) {
foreach $component (@apertis_components) {
$aptly_config->{$apertis_prefix}{$release}{"components"}{$component} = {
"project" => "apertis:".$release.":".$component,
"repository" => "default",
};
$aptly_config->{$apertis_prefix}{$release."-updates"}{"components"}{$component} = {
"project" => "apertis:".$release.":updates:".$component,
"repository" => "default",
};
$aptly_config->{$apertis_prefix}{$release."-security"}{"components"}{$component} = {
"project" => "apertis:".$release.":security:".$component,
"repository" => "default",
};
};
};
1;
```
### OBS aptly integration test
Simple test setting up aptly repositories to validate OBS aptly backend
integration.
*
Copy the following test files to a temporary location with write permissions
to the
`obsrun`
user:
`tests/aptly/aptly.sh tests/aptly/common.sh`
*
Run the test script, which should show this message on success:
```
$ ./aptly.sh
[...]
PASSED: all tests successfully passed!
```
### Reprepro to aptly migration
This test set a few reprepro repositories on OBS, then migrates them to aptly.
*
Copy the following test files to a temporary location with write permissions
to the
`obsrun`
user:
`tests/aptly/common.sh tests/aptly/migration.sh tests/aptly/reprepro.sh`
*
Run the tests scripts, which should show these messages on success:
```
$ ./reprepro.sh
[...]
PASSED: all tests successfully passed!
$ ./migration.sh
[...]
PASSED: all tests successfully passed!
```
Loading