From 27dac6e9b0d2df69037cd022e77a9bf356fc7a67 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Sat, 14 Nov 2015 17:03:49 +0000 Subject: Bug 1224649 - Docker and QA scripts should just use the same checksetup_answers.txt file --- docker/scripts/bugzilla_config.sh | 12 +++++++-- docker/scripts/checksetup_answers.sh | 47 ++++++++++++++++++++++++++++++++++++ docker/scripts/install_deps.sh | 7 ++++++ docker/scripts/my_config.sh | 8 ++++++ docker/scripts/runtests.sh | 16 ++++++++---- 5 files changed, 83 insertions(+), 7 deletions(-) create mode 100644 docker/scripts/checksetup_answers.sh (limited to 'docker/scripts') diff --git a/docker/scripts/bugzilla_config.sh b/docker/scripts/bugzilla_config.sh index d1ca0db0e..b18493749 100755 --- a/docker/scripts/bugzilla_config.sh +++ b/docker/scripts/bugzilla_config.sh @@ -1,5 +1,12 @@ #!/bin/bash +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This Source Code Form is "Incompatible With Secondary Licenses", as +# defined by the Mozilla Public License, v. 2.0. + cd $BUGZILLA_ROOT # Start and initialize database @@ -9,8 +16,9 @@ mysql -u root mysql -e "GRANT ALL PRIVILEGES ON *.* TO bugs@localhost IDENTIFIED mysql -u root mysql -e "CREATE DATABASE bugs CHARACTER SET = 'utf8';" # Setup default Bugzilla database -perl checksetup.pl /files/checksetup_answers.txt -perl checksetup.pl /files/checksetup_answers.txt +bash /scripts/checksetup_answers.sh > checksetup_answers.txt +perl checksetup.pl checksetup_answers.txt +perl checksetup.pl checksetup_answers.txt perl /scripts/generate_bmo_data.pl # Shutdown database diff --git a/docker/scripts/checksetup_answers.sh b/docker/scripts/checksetup_answers.sh new file mode 100644 index 000000000..1c518d019 --- /dev/null +++ b/docker/scripts/checksetup_answers.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This Source Code Form is "Incompatible With Secondary Licenses", as +# defined by the Mozilla Public License, v. 2.0. + +: ${WEB_HOST:=localhost} +: ${DB_PORT_3306_TCP_ADDR:=localhost} +: ${DB_PORT_3306_TCP_PORT:=3306} +: ${DB_ENV_MYSQL_DATABASE:=bugs} +: ${DB_ENV_MYSQL_USER:=bugs} +: ${DB_ENV_MYSQL_PASSWORD:=bugs} +: ${MEMCACHED_PORT_11211_TCP_ADDR:=localhost} + +cat < checksetup_answers.txt +perl checksetup.pl checksetup_answers.txt +perl checksetup.pl checksetup_answers.txt echo -e "\n== Generating bmo data" -perl $BUGZILLA_ROOT/docker/scripts/generate_bmo_data.pl +perl /scripts/generate_bmo_data.pl echo -e "\n== Generating test data" cd $BUGZILLA_ROOT/qa/config -- cgit v1.2.3-24-g4f1b