Browse Source

build: fixes for CI flakes (#18523)

Turns off ELECTRON_ENABLE_LOGGING/ELECTRON_ENABLE_STACK_DUMPING in Windows as they are causing issues.

In Linux, use a newer version of python-dbusmock to resolve dbusmock hanging on dbus_stop
John Kleinschmidt 5 years ago
parent
commit
363d0dafc5
5 changed files with 27 additions and 5 deletions
  1. 7 1
      .circleci/config.yml
  2. 7 0
      .circleci/fix-known-hosts.sh
  3. 1 0
      .dockerignore
  4. 10 4
      Dockerfile
  5. 2 0
      appveyor.yml

+ 7 - 1
.circleci/config.yml

@@ -1,5 +1,11 @@
 build-steps: &build-steps
   steps:
+    - run:
+        name: Fix Known Hosts on Linux
+        command: |
+          if [ "`uname`" == "Linux" ]; then
+            /home/builduser/fix-known-hosts.sh
+          fi
     - checkout
     - run:
         name: Install Node.js 10 on MacOS
@@ -138,7 +144,7 @@ build-steps: &build-steps
 
 build-defaults: &build-defaults
   docker:
-    - image: electronbuilds/electron:0.0.8
+    - image: electronbuilds/electron:0.0.8.1
   <<: *build-steps
 
 version: 2

+ 7 - 0
.circleci/fix-known-hosts.sh

@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -e
+
+mkdir -p ~/.ssh
+echo "|1|cVeiko0f+NcBdQ4UQvusKHo8sOA=|VIYt+cwPlbV0iP9VItsw/wlzrEk= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
+|1|WDYl7KHWaZFGMa3eqg3iY4KmwzQ=|FWZq//rIJ3lr85ZeTr66c80iLiA= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==" >> ~/.ssh/known_hosts

+ 1 - 0
.dockerignore

@@ -1,3 +1,4 @@
 *
 !tools/xvfb-init.sh
 !tools/run-electron.sh
+!.circleci/fix-known-hosts.sh

+ 10 - 4
Dockerfile

@@ -3,8 +3,7 @@ FROM electronbuilds/libchromiumcontent:0.0.4
 USER root
 
 # Set up HOME directory
-ENV HOME=/home
-RUN chmod a+rwx /home
+ENV HOME=/home/builduser
 
 # Install node.js
 RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
@@ -13,8 +12,9 @@ RUN apt-get install -y nodejs
 # Install wget used by crash reporter
 RUN apt-get install -y wget
 
-# Install python-dbusmock
-RUN apt-get install -y python-dbusmock
+# Install python-dbus
+RUN apt-get install -y python-dbus
+RUN pip install python-dbusmock
 
 # Install libnotify
 RUN apt-get install -y libnotify-bin
@@ -22,3 +22,9 @@ RUN apt-get install -y libnotify-bin
 # Add xvfb init script
 ADD tools/xvfb-init.sh /etc/init.d/xvfb
 RUN chmod a+x /etc/init.d/xvfb
+
+COPY .circleci/fix-known-hosts.sh /home/builduser/fix-known-hosts.sh
+RUN chmod a+x /home/builduser/fix-known-hosts.sh
+
+USER builduser
+WORKDIR /home/builduser

+ 2 - 0
appveyor.yml

@@ -44,6 +44,8 @@ test_script:
       Write-Output "Skipping tests for release build"
     } else {
       $env:RUN_TESTS="true"
+      Remove-Item Env:\ELECTRON_ENABLE_LOGGING
+      Remove-Item Env:\ELECTRON_ENABLE_STACK_DUMPING
       Write-Output "Running tests for debug build"
     }
 - if "%RUN_TESTS%"=="true" ( echo Running test suite & python script\test.py --ci --rebuild_native_modules)