mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2025-08-17 13:05:43 +00:00
Add a function to setup bugzilla.
This commit is contained in:
parent
5038dcaab0
commit
de3e961a92
@ -9,7 +9,7 @@ use testapi;
|
||||
use utils;
|
||||
use bugzilla;
|
||||
|
||||
our @EXPORT = qw/select_disks custom_scheme_select custom_blivet_add_partition custom_blivet_format_partition custom_blivet_resize_partition custom_change_type custom_change_fs custom_change_device custom_delete_part get_full_repo check_help_on_pane get_mirrorlist_url crash_anaconda_text report_bug_text/;
|
||||
our @EXPORT = qw/select_disks custom_scheme_select custom_blivet_add_partition custom_blivet_format_partition custom_blivet_resize_partition custom_change_type custom_change_fs custom_change_device custom_delete_part get_full_repo check_help_on_pane get_mirrorlist_url crash_anaconda_text report_bug_text bugzilla_setup/;
|
||||
|
||||
sub select_disks {
|
||||
# Handles disk selection. Has one optional argument - number of
|
||||
@ -361,6 +361,34 @@ sub check_help_on_pane {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
sub bugzilla_setup {
|
||||
# This routines makes necessary settings to enable Bugzilla (staging/production)
|
||||
# reporting from Anaconda easily, without the need to type the Bugzilla API.
|
||||
# Switch to shell
|
||||
send_key("alt-f3");
|
||||
assert_screen("anaconda_text_install_shell");
|
||||
# Navigate to the libreport configuration directory
|
||||
type_string("cd /etc/libreport/events/\n");
|
||||
# Change values in the report_Bugzilla.conf file
|
||||
my $apikey = get_var("_SECRET_BUGZILLA_APIKEY") // undef;
|
||||
# If we want to report to Bugzilla Staging, then we will
|
||||
# change the configuration file. Normally, it is set
|
||||
# to report to the production Bugzilla.
|
||||
my $bugzilla = get_var("BUGZILLA_INSTANCE") // "staging";
|
||||
if ($bugzilla eq "staging") {
|
||||
enter_cmd("sed -i 's/bugzilla.redhat.com/bugzilla.stage.redhat.com/g' report_Bugzilla.conf");
|
||||
}
|
||||
# If API key is defined, update the configuration file with the API key
|
||||
if ($apikey) {
|
||||
enter_cmd("sed -i s/Bugzilla_APIKey =/Bugzilla_APIKey = $apikey/g report_Bugzilla.conf");
|
||||
}
|
||||
#Switch back to the installation console
|
||||
send_key("alt-f1");
|
||||
assert_screen("anaconda_text_install_shell");
|
||||
}
|
||||
|
||||
sub crash_anaconda_text {
|
||||
# This routine uses the Anaconda crash trigger to break the ongoing Anaconda installation to simulate
|
||||
# an Anaconda crash and runs a series of steps that results in creating a bug in Bugzilla.
|
||||
|
@ -1229,7 +1229,7 @@
|
||||
"profiles": {
|
||||
"fedora-seasonal-aarch64-*-aarch64": 20,
|
||||
"fedora-seasonal-ppc64le-*-ppc64le": 20,
|
||||
"fedora-seasonal-x86_64-*-64bit": 20
|
||||
"fedora-universal-x86_64-*-64bit": 20
|
||||
},
|
||||
"settings": {
|
||||
"ANACONDA_TEXT": "1",
|
||||
|
@ -37,6 +37,10 @@ sub run {
|
||||
wait_still_screen 5;
|
||||
}
|
||||
|
||||
if (get_var("CRASH_REPORT") == 1) {
|
||||
bugzilla_setup();
|
||||
}
|
||||
|
||||
# prepare for different number of spokes (e. g. as in Atomic DVD)
|
||||
my %spoke_number = (
|
||||
"language" => 1,
|
||||
|
Loading…
Reference in New Issue
Block a user