Skip to content

Commit 59e11c9

Browse files
authored
Merge branch 'master' into bot-suites
2 parents d57f7ed + 4bb73d8 commit 59e11c9

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

.taskcluster.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ tasks:
4141
else: ${event.ref[11:]}
4242
else: 'dev'
4343

44+
backend_url:
45+
$if: 'tasks_for == "github-push"'
46+
then:
47+
$if: 'event.ref == "refs/heads/testing"'
48+
then: 'https://api.coverage.testing.moz.tools'
49+
else: 'https://api.coverage.moz.tools'
50+
else: 'https://api.coverage.moz.tools'
51+
4452
taskboot_image: "mozilla/taskboot:0.1.9"
4553
in:
4654
- taskId: {$eval: as_slugid("check_lint")}
@@ -226,6 +234,8 @@ tasks:
226234
payload:
227235
maxRunTime: 3600
228236
image: node
237+
env:
238+
BACKEND_URL: "${backend_url}"
229239
command:
230240
- sh
231241
- -lxce

bot/ci/bootstrap.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/bin/bash -ex
22
GRCOV_VERSION="v0.5.3"
33
MERCURIAL_VERSION="5.1"
4+
VERSION_CONTROL_TOOLS_REV="709c897f2444"
45

56
apt-get update
6-
apt-get install --no-install-recommends -y curl lcov bzip2 python2-minimal python-bz2file python-dev
7+
apt-get install --no-install-recommends -y gcc curl bzip2 python2-minimal python-bz2file python-dev
78

89
# Setup mercurial from its own website, without install pip2 which has a lot of dependencies
910
curl -L https://www.mercurial-scm.org/release/mercurial-$MERCURIAL_VERSION.tar.gz | tar -C /opt -xvz
@@ -15,9 +16,11 @@ curl -L https://github.com/mozilla/grcov/releases/download/$GRCOV_VERSION/grcov-
1516
chmod +x /usr/bin/grcov
1617

1718
# Setup mercurial with needed extensions
18-
hg clone https://hg.mozilla.org/hgcustom/version-control-tools /src/version-control-tools/
19+
hg clone -r $VERSION_CONTROL_TOOLS_REV https://hg.mozilla.org/hgcustom/version-control-tools /src/version-control-tools/
1920
ln -s /src/bot/ci/hgrc $HOME/.hgrc
2021

2122
# Cleanup
23+
apt-get purge -y gcc curl python-dev
2224
apt-get autoremove -y
23-
rm -rf /src/version-control-tools/.hg
25+
rm -rf /var/lib/apt/lists/*
26+
rm -rf /src/version-control-tools/.hg /src/version-control-tools/ansible /src/version-control-tools/docs /src/version-control-tools/testing

bot/tests/test__system.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,3 @@ def test_grcov():
2828
Test grcov is available on the system
2929
"""
3030
assert shutil.which("grcov"), "Missing grcov"
31-
32-
33-
def test_genhtml():
34-
"""
35-
Test genhtml is available on the system
36-
"""
37-
assert shutil.which("genhtml"), "Missing genhtml"

frontend/src/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export async function main(load, display, opts) {
3636

3737
// Coverage retrieval.
3838

39-
const COVERAGE_BACKEND_HOST = 'https://api.coverage.moz.tools';
39+
const COVERAGE_BACKEND_HOST = process.env.BACKEND_URL;
4040

4141
function cache_get(cache, key) {
4242
if (key in cache) {

frontend/webpack.common.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const path = require('path');
2+
const webpack = require('webpack');
23
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
34
const HtmlWebpackPlugin = require('html-webpack-plugin')
45
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
@@ -18,6 +19,9 @@ module.exports = {
1819
new MiniCssExtractPlugin({
1920
filename: 'coverage-[hash].css',
2021
}),
22+
new webpack.EnvironmentPlugin({
23+
BACKEND_URL: 'http://localhost:8000',
24+
}),
2125
],
2226
module: {
2327
rules: [

0 commit comments

Comments
 (0)