forked from os-autoinst/os-autoinst-distri-opensuse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved profile generation to boot Agama step
- Loading branch information
Showing
4 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# SUSE's openQA tests | ||
# | ||
# Copyright 2025 SUSE LLC | ||
# SPDX-License-Identifier: FSFAP | ||
|
||
# Summary: Handles Agama auto profile generation. | ||
# Maintainer: QE YaST and Migration (QE Yam) <qe-yam at suse de> | ||
|
||
package Yam::Agama::Pom::ProfileGenerator; | ||
use strict; | ||
use warnings; | ||
use testapi; | ||
use autoyast qw(upload_profile); | ||
|
||
sub new { | ||
my ($class, $args) = @_; | ||
return bless {}, $class; | ||
} | ||
|
||
sub generate_profile { | ||
my ($self) = @_; | ||
my $profile_name = "profile.jsonnet"; | ||
|
||
system("sudo", "zypper", "-n", "removerepo", "systemsmanagement_Agama_Devel"); | ||
system("sudo", "zypper", "-n", "addrepo", "-f", "-G", | ||
"https://download.opensuse.org/repositories/systemsmanagement:Agama:Devel/15.6/systemsmanagement:Agama:Devel.repo"); | ||
system("sudo", "zypper", "-n", "install", "-f", "golang-github-google-jsonnet"); | ||
my $casedir = get_required_var('CASEDIR'); | ||
my $profile_content = `jsonnet $casedir/data/yam/agama/auto/sle.jsonnet`; | ||
|
||
save_tmp_file($profile_name, $profile_content); | ||
|
||
my $profile_url = autoinst_url . "/files/$profile_name"; | ||
upload_profile(path => $profile_name, profile => $profile_content); | ||
} | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters