Skip to content

Commit

Permalink
Migration from mu released to mu unreleased
Browse files Browse the repository at this point in the history
Add upragde autoyast profile and yaml schedule files for migration from
mu released to mu unreleased testsuites.
  • Loading branch information
openQA web UI committed Apr 12, 2024
1 parent 2e0d08f commit aa9b1b5
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<bootloader>
<global>
<activate>false</activate>
<boot_extended>false</boot_extended>
<boot_mbr>true</boot_mbr>
<boot_root>true</boot_root>
<generic_mbr>false</generic_mbr>
<timeout config:type="integer">5</timeout>
</global>
<loader_type>{{LOADER_TYPE}}</loader_type>
</bootloader>
<general>
<mode>
<confirm config:type="boolean">false</confirm>
<second_stage config:type="boolean">false</second_stage>
</mode>
<signature-handling>
<accept_file_without_checksum config:type="boolean">true</accept_file_without_checksum>
<accept_non_trusted_gpg_key config:type="boolean">true</accept_non_trusted_gpg_key>
<accept_unknown_gpg_key config:type="boolean">true</accept_unknown_gpg_key>
<accept_unsigned_file config:type="boolean">false</accept_unsigned_file>
<accept_verification_failed config:type="boolean">false</accept_verification_failed>
<import_gpg_key config:type="boolean">true</import_gpg_key>
</signature-handling>
</general>
<keyboard>
<keymap>english-us</keymap>
</keyboard>
<language>
<language>en_US</language>
<languages>en_US</languages>
</language>
<report>
<errors>
<show config:type="boolean">true</show>
<log config:type="boolean">true</log>
<timeout config:type="integer">0</timeout>
</errors>
<warnings>
<show config:type="boolean">true</show>
<log config:type="boolean">true</log>
<timeout config:type="integer">0</timeout>
</warnings>
<messages>
<show config:type="boolean">true</show>
<log config:type="boolean">true</log>
<timeout config:type="integer">0</timeout>
</messages>
<yesno_messages>
<show config:type="boolean">true</show>
<log config:type="boolean">true</log>
<timeout config:type="integer">0</timeout>
</yesno_messages>
</report>
<software>
<products config:type="list">
<product>SLES</product>
</products>
</software>
<upgrade>
<stop_on_solver_conflict config:type="boolean">true</stop_on_solver_conflict>
</upgrade>
<suse_register>
<do_registration config:type="boolean">true</do_registration>
<reg_server>{{SCC_URL}}</reg_server>
</suse_register>
<add-on>
<add_on_others config:type="list">
% for my $repo (@$repos) {
% my ($repo_id, $addon) = $repo =~ (/(\d+)\/(.*)\//);
<listentry>
<media_url><%= $repo %></media_url>
<name><%= $addon . "_" . $repo_id %></name>
<alias><%= $addon . "_" . $repo_id %></alias>
</listentry>
%}
</add_on_others>
</add-on>
</profile>
5 changes: 5 additions & 0 deletions lib/registration.pm
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,11 @@ sub register_addons_cmd {
my $name = get_addon_fullname($addon);
if (length $name) {
record_info($name, "Register $name");
if (is_sle("=12-SP5") && ($name eq 'we')) {
add_suseconnect_product($name, undef, undef, "-r " . $ADDONS_REGCODE{$name} . $opt, 300, $retry);
record_soft_failure("bsc#1196215: The fix is not backport to SLE12 bacuase on SLE12 is using SUSEConnect");
next;
}
if (grep(/$name/, @SLE12_MODULES) and is_sle('<15')) {
my @ver = split(/\./, scc_version());
add_suseconnect_product($name, $ver[0], undef, undef, 300, $retry);
Expand Down
25 changes: 25 additions & 0 deletions schedule/yast/maintenance/autoupgrade.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: autoupgrade
description: >
Performs a migration from system with released maintenance updates to a product with maintenance updates unreleased
schedule:
- autoyast/prepare_profile
- migration/version_switch_origin_system
- boot/boot_to_desktop
- console/register_original_system
- migration/record_disk_info
- migration/reboot_to_upgrade
- migration/version_switch_upgrade_target
- installation/bootloader
- autoyast/installation
- autoyast/console
- autoyast/login
- autoyast/wicked
- autoyast/repos
- autoyast/clone
- console/zypper_lr
- console/zypper_ref
- autoyast/logs
- autoyast/autoyast_reboot
- installation/grub_test
- installation/first_boot
31 changes: 31 additions & 0 deletions tests/console/register_original_system.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2018 SUSE LLC
# SPDX-License-Identifier: FSFAP

# Package: SUSEConnect
# Summary: Rrgister system and modules of the original system by SUSEConnect
# - Register product using SCC_REGCODE code
# - Register modules and extension
# - Check registering status
# Maintainer: QE YaST and Migration (QE Yam) <qe-yam at suse de>

use base "consoletest";
use strict;
use warnings;
use testapi;
use utils 'zypper_call';
use migration;
use registration;

sub run {
select_console 'root-console';

my $scc_addons = get_var 'SCC_ADDONS_ORIGIN', '';
register_product();
register_addons_cmd($scc_addons) if $scc_addons;
# Check registration status and repos
assert_script_run("zypper --gpg-auto-import-keys ref", timeout => 180, exitcode => [0, 106]);
assert_script_run("zypper lr | tee /dev/$serialdev");
assert_script_run("SUSEConnect --status-text | tee /dev/$serialdev", timeout => 60);
}

1;

0 comments on commit aa9b1b5

Please sign in to comment.