Skip to content

Commit

Permalink
[backend] container: Allow to publish multi-os
Browse files Browse the repository at this point in the history
Allow to publish multiple containers with same tag,
but for different operating systems via the registry

Avoid conflicts in repository build pool by limiting
it to linux OS containers for now.
  • Loading branch information
adrianschroeter committed Feb 27, 2023
1 parent db26cd3 commit b1bae09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/backend/BSPublisher/Container.pm
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ sub upload_all_containers {
my $arch = $containerinfo->{'arch'};
my $goarch = $containerinfo->{'goarch'};
$goarch .= ":$containerinfo->{'govariant'}" if $containerinfo->{'govariant'};
$goarch .= "_$containerinfo->{'goos'}" if $containerinfo->{'goos'} && $containerinfo->{'goos'} ne 'linux';
my @tags = $mapper->($registry, $containerinfo, $projid, $repoid, $arch);
for my $tag (@tags) {
my ($reponame, $repotag) = ($tag, 'latest');
Expand Down
2 changes: 2 additions & 0 deletions src/backend/BSRepServer/Containerinfo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ sub containerinfo2obsbinlnk {
my ($dir, $containerinfo, $packid) = @_;
my $d = readcontainerinfo($dir, $containerinfo);
return unless $d;
# currently no other OS containers. Alternative would be to rename them to avoid conflicts.
return if $d->{'goos'} ne 'linux';
my $lnk = containerinfo2nevra($d);
# need to have a source so that it goes into the :full tree
$lnk->{'source'} = $lnk->{'name'};
Expand Down

0 comments on commit b1bae09

Please sign in to comment.