Permalink
Browse files

ci: Trigger an arm test on VSTS after CircleCI build (#14898)

* ci: Trigger an arm test on VSTS after CircleCI build
  • Loading branch information...
jkleinsc committed Oct 4, 2018
1 parent 1acd840 commit 038b56e31e8e51ecd3fffdfcc74192c09fb7c7bd
@@ -182,6 +182,11 @@ step-nodejs-headers-build: &step-nodejs-headers-build
cd src
ninja -C out/Default third_party/electron_node:headers
step-nodejs-headers-store: &step-nodejs-headers-store
store_artifacts:
path: src/out/Default/gen/node_headers.tar.gz
destination: node_headers.tar.gz
step-electron-publish: &step-electron-publish
run:
name: Publish Electron Dist
@@ -314,6 +319,17 @@ step-maybe-native-mksnapshot-store: &step-maybe-native-mksnapshot-store
path: src/out/native_mksnapshot/mksnapshot.zip
destination: native_mksnapshot.zip
step-maybe-trigger-arm-test: &step-maybe-trigger-arm-test
run:
name: Trigger an arm test on VSTS if applicable
command: |
cd src
# Only run for non-fork prs
if [ "$TRIGGER_ARM_TEST" == "true" ] && [ -z "$CIRCLE_PR_NUMBER" ]; then
#Trigger VSTS job, passing along CircleCI job number and branch to build
echo "Triggering electron-$TARGET_ARCH-testing build on VSTS"
node electron/script/ci-release-build.js --job=electron-$TARGET_ARCH-testing --ci=VSTS --armTest --circleBuildNum=$CIRCLE_BUILD_NUM $CIRCLE_BRANCH
fi
# Lists of steps.
steps-checkout: &steps-checkout
steps:
@@ -377,12 +393,16 @@ steps-electron-build-for-tests: &steps-electron-build-for-tests
# Node.js headers
- *step-nodejs-headers-build
- *step-nodejs-headers-store
- *step-show-sccache-stats
# Save all data needed for a further tests run.
- *step-persist-data-for-tests
# Trigger tests on arm hardware if needed
- *step-maybe-trigger-arm-test
- *step-maybe-notify-slack-failure
- *step-maybe-notify-slack-success
@@ -416,6 +436,7 @@ steps-electron-build-for-publish: &steps-electron-build-for-publish
# Node.js headers
- *step-nodejs-headers-build
- *step-nodejs-headers-store
# ffmpeg
- *step-ffmpeg-gn-gen
@@ -713,6 +734,7 @@ jobs:
<<: *env-arm
<<: *env-testing-build
<<: *env-enable-sccache
TRIGGER_ARM_TEST: true
<<: *steps-electron-build-for-tests
linux-arm-ffmpeg:
@@ -768,6 +790,7 @@ jobs:
<<: *env-arm64
<<: *env-testing-build
<<: *env-enable-sccache
TRIGGER_ARM_TEST: true
<<: *steps-electron-build-for-tests
linux-arm64-ffmpeg:
@@ -0,0 +1,61 @@
FROM arm32v7/ubuntu:16.04
RUN groupadd --gid 1000 builduser \
&& useradd --uid 1000 --gid builduser --shell /bin/bash --create-home builduser
# Set up TEMP directory
ENV TEMP=/tmp
RUN chmod a+rwx /tmp
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
bison \
build-essential \
clang \
curl \
gperf \
git \
libasound2 \
libasound2-dev \
libcap-dev \
libcups2-dev \
libdbus-1-dev \
libgconf-2-4 \
libgconf2-dev \
libgnome-keyring-dev \
libgtk2.0-0 \
libgtk2.0-dev \
libgtk-3-0 \
libgtk-3-dev \
libnotify-bin \
libnss3 \
libnss3-dev \
libxss1 \
libxtst-dev \
libxtst6 \
lsb-release \
locales \
nano \
python-setuptools \
python-pip \
python-dbusmock \
sudo \
unzip \
wget \
xvfb \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# crcmod is required by gsutil, which is used for filling the gclient git cache
RUN pip install -U crcmod
ADD tools/xvfb-init.sh /etc/init.d/xvfb
RUN chmod a+x /etc/init.d/xvfb
RUN usermod -aG sudo builduser
RUN echo 'builduser ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers
WORKDIR /home/builduser

This file was deleted.

Oops, something went wrong.
@@ -3,14 +3,13 @@ FROM arm64v8/ubuntu:16.04
RUN groupadd --gid 1000 builduser \
&& useradd --uid 1000 --gid builduser --shell /bin/bash --create-home builduser
RUN groupadd --gid 114 jenkins \
&& useradd --uid 110 --gid jenkins --shell /bin/bash --create-home jenkins
# Set up TEMP directory
ENV TEMP=/tmp
RUN chmod a+rwx /tmp
RUN apt-get update && apt-get install -y\
RUN dpkg --add-architecture armhf
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
bison \
build-essential \
clang \
@@ -19,6 +18,7 @@ RUN apt-get update && apt-get install -y\
git \
libasound2 \
libasound2-dev \
libc6:armhf \
libcap-dev \
libcups2-dev \
libdbus-1-dev \
@@ -29,35 +29,37 @@ RUN apt-get update && apt-get install -y\
libgtk2.0-dev \
libgtk-3-0 \
libgtk-3-dev \
libnotify-dev \
libnotify-bin \
libnss3 \
libnss3-dev \
libx11-xcb-dev \
libstdc++6:armhf \
libxss1 \
libxtst-dev \
libxtst6 \
lsb-release \
locales \
ninja \
nano \
python-setuptools \
python-pip \
python-dbusmock \
sudo \
unzip \
wget \
xvfb
xvfb \
&& rm -rf /var/lib/apt/lists/*
# Install node.js
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get update && apt-get install -y nodejs
# Install Node.js
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# Install crcmod
# crcmod is required by gsutil, which is used for filling the gclient git cache
RUN pip install -U crcmod
ADD tools/xvfb-init.sh /etc/init.d/xvfb
RUN chmod a+x /etc/init.d/xvfb
# Install ninja in /usr/local
RUN cd /usr/local && git clone https://github.com/martine/ninja.git -b v1.5.3
RUN cd /usr/local/ninja && ./configure.py --bootstrap
RUN usermod -aG sudo builduser
RUN echo 'builduser ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers
USER builduser
WORKDIR /home/builduser

This file was deleted.

Oops, something went wrong.
@@ -1,4 +1,4 @@
require('dotenv-safe').load()
if (!process.env.CI) require('dotenv-safe').load()
const assert = require('assert')
const request = require('request')
@@ -22,6 +22,11 @@ const vstsJobs = [
'electron-release-osx-x64'
]
const vstsArmJobs = [
'electron-arm-testing',
'electron-arm64-testing'
]
async function makeRequest (requestOptions, parseResponse) {
return new Promise((resolve, reject) => {
request(requestOptions, (err, res, body) => {
@@ -135,16 +140,22 @@ function buildCircleCI (targetBranch, options) {
}
async function buildVSTS (targetBranch, options) {
if (options.job) {
if (options.armTest) {
assert(vstsArmJobs.includes(options.job), `Unknown VSTS CI arm test job name: ${options.job}. Valid values are: ${vstsArmJobs}.`)
} else if (options.job) {
assert(vstsJobs.includes(options.job), `Unknown VSTS CI job name: ${options.job}. Valid values are: ${vstsJobs}.`)
}
console.log(`Triggering VSTS to run build on branch: ${targetBranch} with release flag.`)
const environmentVariables = {
ELECTRON_RELEASE: 1
}
if (!options.ghRelease) {
environmentVariables.UPLOAD_TO_S3 = 1
if (options.armTest) {
environmentVariables.CIRCLE_BUILD_NUM = options.circleBuildNum
} else {
if (!options.ghRelease) {
environmentVariables.UPLOAD_TO_S3 = 1
}
}
const requestOpts = {
@@ -226,12 +237,13 @@ module.exports = runRelease
if (require.main === module) {
const args = require('minimist')(process.argv.slice(2), {
boolean: ['ghRelease', 'automaticRelease']
boolean: ['ghRelease', 'automaticRelease', 'armTest']
})
const targetBranch = args._[0]
if (args._.length < 1) {
console.log(`Trigger CI to build release builds of electron.
Usage: ci-release-build.js [--job=CI_JOB_NAME] [--ci=CircleCI|AppVeyor|VSTS] [--ghRelease] [--automaticRelease] TARGET_BRANCH
Usage: ci-release-build.js [--job=CI_JOB_NAME] [--ci=CircleCI|AppVeyor|VSTS]
[--ghRelease] [--automaticRelease] [--armTest] [--circleBuildNum=xxx] TARGET_BRANCH
`)
process.exit(0)
}
Oops, something went wrong.

0 comments on commit 038b56e

Please sign in to comment.