From ea1d22b3f6151d7316ef73c4b4f08a4c8b591c72 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Tue, 25 Jul 2017 15:19:54 -0400 Subject: Bug 1380531 - Write initial CircleCI configuration for BMO This is the first (working) iteration of a configuration that allows CircleCI to build 'bmo' docker images that are runnable. Some other changes were required for this: 1. The base image used in Dockerfile was changed from centos:6.7 to mozillabteam/bmo-base:slim. This is a new version of (github) mozilla-bteam/docker-bmo-base which is much smaller, and includes all the system RPMs and other bits that our bmo Dockerfile expects. 2. init.pl mistakenly had '--no-assets' which is not currently a checksetup.pl option. 3. 901-secure-mail-loop.t (which checks for an infinite loop) had to have its timeout increased because CircleCI sometimes is quite slow. 4. version.txt // __version__ now includes build information from CircleCI environmental variables --- extensions/BMO/Extension.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'extensions/BMO') diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index 0f63ffbb4..cb1996cbc 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -2544,8 +2544,11 @@ sub install_filesystem { my $contribute = eval { $json->decode(scalar read_file(bz_locations()->{cgi_path} . "/contribute.json")); }; - my $commit = `git rev-parse HEAD`; - chomp $commit; + my $commit = $ENV{CIRCLE_SHA1}; + unless ($commit) { + $commit = `git rev-parse HEAD`; + chomp $commit; + } if (!$contribute) { die "Missing or invalid contribute.json file"; @@ -2555,7 +2558,7 @@ sub install_filesystem { source => $contribute->{repository}{url}, version => BUGZILLA_VERSION, commit => $commit // "unknown", - build => $ENV{BUGZILLA_CI_BUILD} // "unknown", + build => $ENV{CIRCLE_BUILD_NUM} // "unknown", }; $create_files->{'version.json'} = { -- cgit v1.2.3-24-g4f1b