summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.circleci/config.yml29
-rw-r--r--conf/log4perl-test.conf9
2 files changed, 28 insertions, 10 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index f5c761af4..1283d573b 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -5,13 +5,6 @@
version: 2
-main_filters: &main_filters
- branches:
- ignore:
- - /^(?:release|test)-20\d\d\d\d\d\d\.\d+/
- - /\//
- - production
-
defaults:
bmo_slim_image: &bmo_slim_image
image: mozillabteam/bmo-slim:20180330.1
@@ -20,6 +13,18 @@ defaults:
mysql_image: &mysql_image
image: mozillabteam/bmo-mysql:5.6
+ store_log: &store_log
+ store_artifacts:
+ path: /app/bugzilla.log
+ destination: bugzilla.log
+
+ main_filters: &main_filters
+ branches:
+ ignore:
+ - /^(?:release|test)-20\d\d\d\d\d\d\.\d+/
+ - /\//
+ - production
+
bmo_env: &bmo_env
PORT: 8000
LOGGING_PORT: 5880
@@ -81,6 +86,8 @@ jobs:
name: build push data
command: |
mv /opt/bmo/local /app/local
+ perl Makefile.PL
+ perl -I/app -I/app/local/lib/perl5 -MBugzilla -e 1
perl checksetup.pl --no-database --no-templates --no-permissions
perl scripts/build-bmo-push-data.pl
- run:
@@ -115,6 +122,7 @@ jobs:
paths: ["*.txt"]
- store_artifacts:
path: /app/build_info
+ - *store_log
build:
working_directory: /app
@@ -138,6 +146,7 @@ jobs:
- run: "docker cp bmo:/app/version.json build_info/version.json"
- store_artifacts:
path: /app/build_info
+ - *store_log
- deploy:
command: |
TAG="$(cat /app/build_info/tag.txt)"
@@ -158,7 +167,7 @@ jobs:
docker push "$DOCKERHUB_REPO:latest"
test_sanity:
- parallelism: 2
+ parallelism: 1
working_directory: /app
docker:
- <<: *bmo_slim_image
@@ -181,6 +190,7 @@ jobs:
/app/scripts/entrypoint.pl prove -qf $(circleci tests glob 't/*.t' | circleci tests split) | tee artifacts/$CIRCLE_JOB.txt
- store_artifacts:
path: /app/artifacts
+ - *store_log
test_webservices:
parallelism: 1
@@ -199,6 +209,7 @@ jobs:
/app/scripts/entrypoint.pl test_webservices | tee artifacts/$CIRCLE_JOB.txt
- store_artifacts:
path: /app/artifacts
+ - *store_log
test_selenium:
parallelism: 1
@@ -217,6 +228,7 @@ jobs:
/app/scripts/entrypoint.pl test_selenium | tee artifacts/$CIRCLE_JOB.txt
- store_artifacts:
path: /app/artifacts
+ - *store_log
test_bmo:
parallelism: 1
@@ -246,6 +258,7 @@ jobs:
- run: |
[[ -f build_info/only_version_changed.txt ]] && exit 0
/app/scripts/entrypoint.pl test_bmo -q -f t/bmo/*.t
+ - *store_log
workflows:
version: 2
diff --git a/conf/log4perl-test.conf b/conf/log4perl-test.conf
index eda81d31b..65558ba4f 100644
--- a/conf/log4perl-test.conf
+++ b/conf/log4perl-test.conf
@@ -1,4 +1,4 @@
-log4perl.rootLogger = DEBUG, Cereal, Screen
+log4perl.rootLogger = DEBUG, Cereal, Screen, File
log4perl.appender.Cereal = Log::Log4perl::Appender::Socket
log4perl.appender.Cereal.PeerAddr=127.0.0.1
log4perl.appender.Cereal.PeerPort=5880
@@ -10,4 +10,9 @@ log4perl.filter.IS_INTERACTIVE = sub { Bugzilla::Logging::is_interactive() }
log4perl.appender.Screen = Log::Log4perl::Appender::Screen
log4perl.appender.Screen.Filter = IS_INTERACTIVE
log4perl.appender.Screen.layout = Log::Log4perl::Layout::PatternLayout
-log4perl.appender.Screen.layout.ConversionPattern = %-5.5p [%d] [%c] %m{chomp} at %F line %L (%M)%n \ No newline at end of file
+log4perl.appender.Screen.layout.ConversionPattern = %-5.5p [%d] [%c] %m{chomp} at %F line %L (%M)%n
+
+log4perl.appender.File = Log::Log4perl::Appender::File
+log4perl.appender.File.layout = Log::Log4perl::Layout::Mozilla
+log4perl.appender.File.filename = /app/bugzilla.log
+log4perl.appender.File.mode = append