test_sanity:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Install docker-compose
run: sudo apt update && sudo apt install -y docker-compose
- name: Build the Docker images
run: docker compose -f docker-compose.test.yml build
- name: Run sanity tests
- run: docker-compose -f docker-compose.test.yml run --no-deps bmo.test test_sanity t/*.t extensions/*/t/*.t
+ run: docker compose -f docker-compose.test.yml run --no-deps bugzilla6.test test_sanity t/*.t extensions/*/t/*.t
# test_webservices:
# runs-on: ubuntu-latest
# steps:
-# - uses: actions/checkout@v3
+# - uses: actions/checkout@v4
# - name: Install docker-compose
# run: sudo apt update && sudo apt install -y docker-compose
# - name: Build the Docker images
# run: docker compose -f docker-compose.test.yml build
# - name: Run webservice tests
-# run: docker-compose -f docker-compose.test.yml run bmo.test test_webservices
+# run: docker-compose -f docker-compose.test.yml run bugzilla6.test test_webservices
- test_bmo:
+ test_bugzilla6:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Install docker-compose
run: sudo apt update && sudo apt install -y docker-compose
- name: Build the Docker images
run: docker compose -f docker-compose.test.yml build
- name: Run bmo specific tests
- run: docker-compose -f docker-compose.test.yml run -e CI=1 bmo.test test_bmo -q -f t/bmo/*.t
+ run: docker-compose -f docker-compose.test.yml run -e CI=1 bugzilla6.test test_bmo -q -f t/bmo/*.t
ENV DEBIAN_FRONTEND noninteractive
-ARG CI
-ARG CIRCLE_SHA1
-ARG CIRCLE_BUILD_URL
-
-ENV CI=${CI}
-ENV CIRCLE_BUILD_URL=${CIRCLE_BUILD_URL}
-ENV CIRCLE_SHA1=${CIRCLE_SHA1}
-
ENV LOG4PERL_CONFIG_FILE=log4perl-json.conf
RUN apt-get install -y rsync
--- /dev/null
+FROM mysql:8
+# We do this because we don't want everything in the docker/mysql folder, just the one
+COPY docker/mysql/bugzilla-mysql8.cnf /etc/mysql/conf.d/
If we release harmony and it has a good (and small!) container, it will look
good.
+**[COMPLETED]**
+
# Documentation
BMO gutted some of upstream's documentation about Bugzilla, so the entirety of
version: '3.6'
services:
- bmo.test:
- build: &bmo_build
+ bugzilla6.test:
+ build:
context: .
dockerfile: Dockerfile
command: dev_httpd
environment:
- 'BMO_inbound_proxies=*'
- BMO_db_driver=pg
- - BMO_db_host=bmo.db
+ - BMO_db_host=bugzilla6.db
- BMO_db_name=bugs
- BMO_db_pass=bugs
- BMO_db_user=bugs
- BZ_QA_ANSWERS_FILE=/app/.circleci/checksetup_answers.txt
- BZ_QA_CONF_FILE=/app/.circleci/selenium_test.conf
- BZ_QA_CONFIG=1
- - CI=${CI}
- - CIRCLE_SHA1=${CIRCLE_SHA1}
- - CIRCLE_BUILD_URL=${CIRCLE_BUILD_URL}
- LOCALCONFIG_ENV=1
- LOG4PERL_CONFIG_FILE=log4perl-test.conf
- LOGGING_PORT=5880
- TWD_HOST=selenium
- TWD_PORT=4444
depends_on:
- - bmo.db
+ - bugzilla6.db
- memcached
- selenium
- bmo.db:
+ bugzilla6.db:
image: postgres:9.0
tmpfs:
- /tmp
shm_size: '512m'
ports:
- "5900:5900"
-
-volumes:
- bmo-pg-db:
version: '3.6'
services:
- bmo.test:
- build: &bmo_build
+ bugzilla6.test:
+ build:
context: .
dockerfile: Dockerfile
command: dev_httpd
- /run
environment:
- 'BMO_inbound_proxies=*'
- - BMO_db_host=bmo.db
+ - BMO_db_host=bugzilla6.db
- BMO_db_name=bugs
- BMO_db_pass=bugs
- BMO_db_user=bugs
- BZ_QA_ANSWERS_FILE=/app/.github/checksetup_answers.txt
- BZ_QA_CONF_FILE=/app/.github/selenium_test.conf
- BZ_QA_CONFIG=1
- - CI=${CI}
- - CIRCLE_SHA1=${CIRCLE_SHA1}
- - CIRCLE_BUILD_URL=${CIRCLE_BUILD_URL}
- LOCALCONFIG_ENV=1
- LOG4PERL_CONFIG_FILE=log4perl-test.conf
- LOGGING_PORT=5880
- TWD_HOST=selenium
- TWD_PORT=4444
depends_on:
- - bmo.db
+ - bugzilla6.db
- memcached
- selenium
- bmo.db:
+ bugzilla6.db:
image: mysql:8
tmpfs:
- /tmp
shm_size: '512m'
ports:
- "5900:5900"
-
-volumes:
- bmo-mysql-db:
version: '3.6'
services:
- bmo.test:
- build: &bmo_build
+ bugzilla6.web:
+ build: &bz_build
context: .
dockerfile: Dockerfile
command: dev_httpd
volumes:
- - bmo-data-dir:/app/data
+ - bugzilla6-data-dir:/app/data
- .:/mnt/sync
tmpfs:
- /tmp
- /run
- environment: &bmo_env
+ environment: &bz_env
- 'BMO_inbound_proxies=*'
- - BMO_db_host=bmo.db
+ - BMO_db_host=bugzilla6.db
- BMO_db_name=bugs
- BMO_db_pass=bugs
- BMO_db_user=bugs
+ - BMO_db_mysql_ssl_get_pubkey=1
- BMO_memcached_namespace=bugzilla
- BMO_memcached_servers=memcached:11211
- BMO_ses_username=ses@mozilla.bugs
- BMO_ses_password=password123456789!
- - BMO_urlbase=http://bmo.test/
+ - BMO_urlbase=http://127.0.0.1:8000/
- BUGZILLA_ALLOW_INSECURE_HTTP=1
- BZ_ANSWERS_FILE=/app/conf/checksetup_answers.txt
- HTTP_BACKEND=morbo
- LOCALCONFIG_ENV=1
- LOG4PERL_CONFIG_FILE=log4perl-docker.conf
- - MOJO_LISTEN=http://*:80
- - PORT=80
+ - MOJO_LISTEN=http://*:8000
+ - PORT=8000
depends_on:
- - bmo.db
+ - bugzilla6.db
- memcached
- - tinyproxy
+# - tinyproxy
+ ports:
+ - "8000:8000"
- bmo.jobqueue:
- build: *bmo_build
- command: jobqueue
- volumes:
- - bmo-data-dir:/app/data
- tmpfs:
- - /tmp
- - /run
- environment: *bmo_env
- restart: always
- depends_on:
- - bmo.db
- - memcached
+# bugzilla6.jobqueue:
+# build: *bz_build
+# command: jobqueue
+# volumes:
+# - bugzilla6-data-dir:/app/data
+# tmpfs:
+# - /tmp
+# - /run
+# environment: *bz_env
+# restart: always
+# depends_on:
+# - bugzilla6.db
+# - memcached
- bmo.feed:
- build: *bmo_build
- command:
- - perl
- - extensions/PhabBugz/bin/phabbugz_feed.pl
- - start
- - '-d'
- - '-f'
- volumes:
- - bmo-data-dir:/app/data
- tmpfs:
- - /tmp
- - /run
- environment: *bmo_env
- restart: always
- depends_on:
- - bmo.db
- - memcached
+# bugzilla6.feed:
+# build: *bz_build
+# command:
+# - perl
+# - extensions/PhabBugz/bin/phabbugz_feed.pl
+# - start
+# - '-d'
+# - '-f'
+# volumes:
+# - bugzilla6-data-dir:/app/data
+# tmpfs:
+# - /tmp
+# - /run
+# environment: *bz_env
+# restart: always
+# depends_on:
+# - bugzilla6.db
+# - memcached
- bmo.pushd:
- build: *bmo_build
- command:
- - perl
- - extensions/Push/bin/bugzilla-pushd.pl
- - start
- - '-d'
- - '-f'
- volumes:
- - bmo-data-dir:/app/data
- tmpfs:
- - /tmp
- - /run
- environment: *bmo_env
- restart: always
- depends_on:
- - bmo.db
- - memcached
+# bugzilla6.pushd:
+# build: *bz_build
+# command:
+# - perl
+# - extensions/Push/bin/bugzilla-pushd.pl
+# - start
+# - '-d'
+# - '-f'
+# volumes:
+# - bugzilla6-data-dir:/app/data
+# tmpfs:
+# - /tmp
+# - /run
+# environment: *bz_env
+# restart: always
+# depends_on:
+# - bugzilla6.db
+# - memcached
- bmo.db:
- image: mysql:8
+ bugzilla6.db:
+ build:
+ context: .
+ dockerfile: Dockerfile.mysql8
volumes:
- - bmo-mysql-db:/var/lib/mysql
- - ./docker/mysql:/etc/mysql/conf.d
+ - bugzilla6-mysql-db:/var/lib/mysql
tmpfs:
- /tmp
logging:
memcached:
image: memcached:latest
- tinyproxy:
- build:
- context: docker/tinyproxy
- dockerfile: ./Dockerfile
- ports:
- - "1080:1080"
+# tinyproxy:
+# build:
+# context: docker/tinyproxy
+# dockerfile: ./Dockerfile
+# ports:
+# - "1080:1080"
volumes:
- bmo-mysql-db:
- bmo-data-dir:
+ bugzilla6-mysql-db:
+ bugzilla6-data-dir:
((ITER++))
$DOCKER pull bugzilla/bugzilla-perl-slim:${DATE}.${ITER} >/dev/null 2>/dev/null
done
-$DOCKER build -t bugzilla/bugzilla-perl-slim:${DATE}.${ITER} -f Dockerfile.bmo-slim .
+$DOCKER build -t bugzilla/bugzilla-perl-slim:${DATE}.${ITER} -f Dockerfile.bugzilla-slim .
if [ $? == 0 ]; then
echo
echo "The build appears to have succeeded. Don't forget to change the FROM line"
--- /dev/null
+[mysqld]
+max_allowed_packet = 64M
+
+[mysql]
+max_allowed_packet = 64M
export CIRCLE_BUILD_URL=""
$DOCKER compose -f docker-compose.test.yml build
if [ $? == 0 ]; then
- $DOCKER compose -f docker-compose.test.yml run bmo.test test_bmo -q -f t/bmo/*.t
+ $DOCKER compose -f docker-compose.test.yml run --rm --name bugzilla6.test bugzilla6.test test_bmo -q -f t/bmo/*.t
+ $DOCKER compose -f docker-compose.test.yml stop
else
echo "docker compose build failed."
fi
use constant CI => $ENV{CI};
my $cmd = shift @ARGV;
+print "cmd = $cmd\n";
my $opts = __PACKAGE__->can("opt_$cmd") // sub {@ARGV};
my $func = __PACKAGE__->can("cmd_$cmd") // sub {
check_data_dir();
);
}
+ require Bugzilla;
+ my $answers = Bugzilla->installation_answers($ENV{BZ_ANSWERS_FILE});
+ my $BZ_URLBASE = $::ENV{'BMO_urlbase'};
+ my $LOGIN_USER = "Admin user: $answers->{'ADMIN_EMAIL'}";
+ my $LOGIN_PASS = "Admin password: $answers->{'ADMIN_PASSWORD'}";
+ print <<EOF;
+#########################################
+## ##
+## Your Bugzilla installation should ##
+## now be reachable at: ##
+## ##
+EOF
+printf "##%s%s%s##\n", ' ' x int((37 - length($BZ_URLBASE)) / 2), $BZ_URLBASE, ' ' x (int((37 - length($BZ_URLBASE)) / 2) + (1 - length($BZ_URLBASE)%2));
+ print <<EOF;
+## ##
+EOF
+printf "##%s%s%s##\n", ' ' x int((37 - length($LOGIN_USER)) / 2), $LOGIN_USER, ' ' x (int((37 - length($LOGIN_USER)) / 2) + (1 - length($LOGIN_USER)%2));
+printf "##%s%s%s##\n", ' ' x int((37 - length($LOGIN_PASS)) / 2), $LOGIN_PASS, ' ' x (int((37 - length($LOGIN_PASS)) / 2) + (1 - length($LOGIN_PASS)%2));
+print <<EOF;
+## ##
+## user/password only valid if you ##
+## haven't already changed them. ##
+## ##
+#########################################
+EOF
my $httpd_exit_f = run_cereal_and_httpd('-DACCESS_LOGS');
assert_httpd()->get;
exit $httpd_exit_f->get;