summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/eject-users-from-groups.pl2
-rwxr-xr-xscripts/entrypoint.pl18
-rwxr-xr-xscripts/generate_bmo_data.pl6
-rwxr-xr-xscripts/move_os.pl2
-rwxr-xr-xscripts/movebugs.pl6
-rwxr-xr-xscripts/nagios_blocker_checker.pl2
-rwxr-xr-xscripts/remove_idle_group_members.pl2
-rwxr-xr-xscripts/reset_default_user.pl2
8 files changed, 23 insertions, 17 deletions
diff --git a/scripts/eject-users-from-groups.pl b/scripts/eject-users-from-groups.pl
index 52e2bbbf3..4b27be83d 100755
--- a/scripts/eject-users-from-groups.pl
+++ b/scripts/eject-users-from-groups.pl
@@ -23,7 +23,7 @@ Bugzilla->usage_mode(USAGE_MODE_CMDLINE);
my $dbh = Bugzilla->dbh;
my @remove_group_names;
-my $nobody_name = 'nobody@mozilla.org';
+my $nobody_name = Bugzilla->params->{'nobody_user'};
my $admin_name = 'automation@bmo.tld';
GetOptions(
diff --git a/scripts/entrypoint.pl b/scripts/entrypoint.pl
index e5ecc4324..c48582606 100755
--- a/scripts/entrypoint.pl
+++ b/scripts/entrypoint.pl
@@ -57,11 +57,6 @@ check_env(qw(
BMO_urlbase
));
-if ( $ENV{BMO_urlbase} eq 'AUTOMATIC' ) {
- $ENV{BMO_urlbase} = sprintf 'http://%s:%d/%s', hostname(), $ENV{PORT}, $ENV{BZ_QA_LEGACY_MODE} ? 'bmo/' : '';
- $ENV{BZ_BASE_URL} = sprintf 'http://%s:%d', hostname(), $ENV{PORT};
-}
-
$func->($opts->());
sub cmd_demo {
@@ -111,6 +106,11 @@ sub cmd_dev_httpd {
exit $httpd_exit_f->get;
}
+sub cmd_checksetup_gen_files {
+ my (@args) = @_;
+ run( 'perl', 'checksetup.pl', '--no-database', @args);
+}
+
sub cmd_checksetup {
check_data_dir();
wait_for_db();
@@ -141,7 +141,7 @@ sub cmd_test_webservices {
check_data_dir();
copy_qa_extension();
assert_database()->get;
- my $httpd_exit_f = run_cereal_and_httpd('-DHTTPD_IN_SUBDIR', '-DACCESS_LOGS');
+ my $httpd_exit_f = run_cereal_and_httpd('-DHTTPD_IN_SUBDIR');
my $prove_exit_f = run_prove(
httpd_url => $conf->{browser_url},
prove_cmd => [
@@ -196,7 +196,7 @@ sub cmd_test_bmo {
$ENV{BZ_TEST_NEWBIE2} = 'newbie2@mozilla.example';
$ENV{BZ_TEST_NEWBIE2_PASS} = 'captain.space.pants.time.lord';
- my $httpd_exit_f = run_cereal_and_httpd('-DACCESS_LOGS');
+ my $httpd_exit_f = run_cereal_and_httpd();
my $prove_exit_f = run_prove(
httpd_url => $ENV{BZ_BASE_URL},
prove_cmd => [ 'prove', '-I/app', '-I/app/local/lib/perl5', @prove_args ],
@@ -247,6 +247,10 @@ sub copy_qa_extension {
dircopy('/app/qa/extensions/QA', '/app/extensions/QA');
}
+sub cmd_wait_for_db {
+ wait_for_db();
+}
+
sub wait_for_db {
assert_database()->get;
}
diff --git a/scripts/generate_bmo_data.pl b/scripts/generate_bmo_data.pl
index 6356762c8..8a9f72d17 100755
--- a/scripts/generate_bmo_data.pl
+++ b/scripts/generate_bmo_data.pl
@@ -158,7 +158,7 @@ $group->update();
my @users = (
{
- login => 'nobody@mozilla.org',
+ login => Bugzilla->params->{'nobody_user'},
realname => 'Nobody; OK to take it and work on it',
password => '*'
},
@@ -267,7 +267,7 @@ my @products = (
name => 'General',
description => 'For bugs in Firefox which do not fit into ' .
'other more specific Firefox components',
- initialowner => 'nobody@mozilla.org',
+ initialowner => Bugzilla->params->{'nobody_user'},
initialqaowner => '',
initial_cc => [],
watch_user => 'general@firefox.bugs'
@@ -287,7 +287,7 @@ my @products = (
name => 'General',
description => 'This is the component for issues specific to bugzilla.mozilla.org '
. 'that do not belong in other components.',
- initialowner => 'nobody@mozilla.org',
+ initialowner => Bugzilla->params->{'nobody_user'},
initialqaowner => '',
initial_cc => [],
watch_user => 'general@bugzilla.bugs'
diff --git a/scripts/move_os.pl b/scripts/move_os.pl
index 546b47c7e..963188261 100755
--- a/scripts/move_os.pl
+++ b/scripts/move_os.pl
@@ -40,7 +40,7 @@ my $dbh = Bugzilla->dbh;
my $timestamp = $dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)');
my $bug_ids = $dbh->selectcol_arrayref(q{SELECT bug_id FROM bugs WHERE bugs.op_sys = ?}, undef, $from_os);
my $field = Bugzilla::Field->check({ name => 'op_sys', cache => 1 });
-my $nobody = Bugzilla::User->check({ name => 'nobody@mozilla.org', cache => 1 });
+my $nobody = Bugzilla::User->check({ name => Bugzilla->params->{'nobody_user'}, cache => 1 });
my $bug_count = @$bug_ids;
if ($bug_count == 0) {
diff --git a/scripts/movebugs.pl b/scripts/movebugs.pl
index 2c643cdfb..55a43d943 100755
--- a/scripts/movebugs.pl
+++ b/scripts/movebugs.pl
@@ -73,10 +73,12 @@ my $component_field_id = $dbh->selectrow_array(
$component_field_id
or die "Can't find field ID for 'component' field\n";
+my $nobody = Bugzilla->params->{'nobody_user'};
my $user_id = $dbh->selectrow_array(
- "SELECT userid FROM profiles WHERE login_name='nobody\@mozilla.org'");
+ "SELECT userid FROM profiles WHERE login_name=?",
+ undef, $nobody);
$user_id
- or die "Can't find user ID for 'nobody\@mozilla.org'\n";
+ or die "Can't find user ID for '$nobody'\n";
$dbh->bz_start_transaction();
diff --git a/scripts/nagios_blocker_checker.pl b/scripts/nagios_blocker_checker.pl
index a02a1602a..01a7b7348 100755
--- a/scripts/nagios_blocker_checker.pl
+++ b/scripts/nagios_blocker_checker.pl
@@ -28,7 +28,7 @@ my $config = {
assignee => '',
product => '',
component => '',
- unassigned => 'nobody@mozilla.org',
+ unassigned => Bugzilla->params->{'nobody_user'},
# severities
severity => 'major,critical,blocker',
# time in hours to wait before paging/warning
diff --git a/scripts/remove_idle_group_members.pl b/scripts/remove_idle_group_members.pl
index 74e8658ff..e4ef88bc1 100755
--- a/scripts/remove_idle_group_members.pl
+++ b/scripts/remove_idle_group_members.pl
@@ -78,7 +78,7 @@ foreach my $group_id (keys %remove_data) {
$dbh->bz_commit_transaction();
# nobody@mozilla.org cannot recieve email
- next if $group->owner->login eq 'nobody@mozilla.org';
+ next if $group->owner->login eq Bugzilla->params->{'nobody_user'};
_send_email($group, \@users_removed);
}
diff --git a/scripts/reset_default_user.pl b/scripts/reset_default_user.pl
index d0d2534f2..942afda17 100755
--- a/scripts/reset_default_user.pl
+++ b/scripts/reset_default_user.pl
@@ -52,7 +52,7 @@ if (!$product || $help
}
# We will need these for entering into bugs_activity
-my $who = Bugzilla::User->new({ name => 'nobody@mozilla.org' });
+my $who = Bugzilla::User->new({ name => Bugzilla->params->{'nobody_user'} });
my $field = Bugzilla::Field->new({ name => $field_name });
trick_taint($product);