зеркало из https://github.com/mozilla/normandy.git
Merge pull request #730 from Osmose/artifact-builds
TaskCluster: Combine tasks and use artifact builds.
This commit is contained in:
Коммит
04df6ce540
|
@ -4,9 +4,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
apt-transport-https \
|
||||
curl \
|
||||
git \
|
||||
python-software-properties \
|
||||
python2.7 \
|
||||
python3.6 \
|
||||
python3.6-venv \
|
||||
software-properties-common \
|
||||
xvfb \
|
||||
zip
|
||||
|
||||
|
@ -15,8 +17,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
||||
echo 'deb https://deb.nodesource.com/node_6.x yakkety main' > /etc/apt/sources.list.d/nodesource.list && \
|
||||
echo 'deb-src https://deb.nodesource.com/node_6.x yakkety main' >> /etc/apt/sources.list.d/nodesource.list && \
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 323293EE && \
|
||||
echo 'deb http://ppa.launchpad.net/mercurial-ppa/releases/ubuntu yakkety main' > /etc/apt/sources.list.d/mercurial.list && \
|
||||
echo 'deb-src http://ppa.launchpad.net/mercurial-ppa/releases/ubuntu yakkety main' >> /etc/apt/sources.list.d/mercurial.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y nodejs
|
||||
apt-get install -y nodejs mercurial
|
||||
|
||||
RUN curl -O https://hg.mozilla.org/mozilla-central/raw-file/tip/python/mozboot/bin/bootstrap.py && \
|
||||
python2.7 bootstrap.py --no-interactive --application-choice=browser
|
||||
python2.7 bootstrap.py --no-interactive --application-choice=browser_artifact_mode
|
||||
|
|
|
@ -9,61 +9,17 @@ BASE_URL = 'http://taskcluster/queue/v1'
|
|||
|
||||
tasks = [
|
||||
{
|
||||
'name': 'recipe-client-addon:fetch',
|
||||
'description': 'Download gecko-dev and sync Normandy changes',
|
||||
'command': 'normandy/recipe-client-addon/bin/tc/fetch.sh',
|
||||
'name': 'recipe-client-addon:build_test',
|
||||
'description': (
|
||||
'Download mozilla-central, sync Normandy changes, build Firefox, and run Normandy '
|
||||
'tests'
|
||||
),
|
||||
'command': 'normandy/recipe-client-addon/bin/tc/build_test.sh',
|
||||
},
|
||||
{
|
||||
'name': 'recipe-client-addon:lint',
|
||||
'description': 'Run lint checks on the add-on',
|
||||
'command': 'normandy/recipe-client-addon/bin/tc/lint.sh',
|
||||
'dependencies': ['recipe-client-addon:fetch'],
|
||||
'artifacts_from': [
|
||||
{
|
||||
'task_name': 'recipe-client-addon:fetch',
|
||||
'path': 'public/source.tar.gz',
|
||||
'env_var': 'FETCH_RESULT',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'recipe-client-addon:build',
|
||||
'description': 'Build Firefox with recipe-client-addon',
|
||||
'command': 'normandy/recipe-client-addon/bin/tc/build.sh',
|
||||
'dependencies': ['recipe-client-addon:fetch'],
|
||||
'artifacts_from': [
|
||||
{
|
||||
'task_name': 'recipe-client-addon:fetch',
|
||||
'path': 'public/source.tar.gz',
|
||||
'env_var': 'FETCH_RESULT',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'recipe-client-addon:test',
|
||||
'description': 'Test recipe-client-addon with gecko-dev',
|
||||
'command': 'normandy/recipe-client-addon/bin/tc/test.sh',
|
||||
'dependencies': ['recipe-client-addon:build'],
|
||||
'artifacts_from': [
|
||||
{
|
||||
'task_name': 'recipe-client-addon:build',
|
||||
'path': 'public/build.tar.gz',
|
||||
'env_var': 'BUILD_RESULT',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'recipe-client-addon:package',
|
||||
'description': 'Package the built Firefox (with shield-recipe-client) for distribution',
|
||||
'command': 'normandy/recipe-client-addon/bin/tc/package.sh',
|
||||
'dependencies': ['recipe-client-addon:build'],
|
||||
'artifacts_from': [
|
||||
{
|
||||
'task_name': 'recipe-client-addon:build',
|
||||
'path': 'public/build.tar.gz',
|
||||
'env_var': 'BUILD_RESULT',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'recipe-client-addon:make-xpi',
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
# mach wants this
|
||||
export SHELL=$(which bash)
|
||||
|
||||
# Fetches source code from fetch task, and creates ./gecko-dev-master/
|
||||
echo 'Downloading fetch result'
|
||||
curl --location --fail --silent --show-error "$FETCH_RESULT" | tar xz
|
||||
|
||||
echo 'Setting up environment'
|
||||
pushd gecko-dev-master
|
||||
source /root/.cargo/env
|
||||
python2.7 ./python/mozboot/bin/bootstrap.py --no-interactive --application-choice=browser
|
||||
source /root/.cargo/env
|
||||
|
||||
echo 'Building Firefox'
|
||||
./mach build
|
||||
popd
|
||||
|
||||
echo 'Making build tarball artifact'
|
||||
tar czf /artifacts/build.tar.gz gecko-dev-master
|
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
# mach wants this
|
||||
export SHELL=$(which bash)
|
||||
|
||||
# Creates mozilla-central
|
||||
echo 'Downloading mozilla-central...'
|
||||
hg clone http://hg.mozilla.org/mozilla-central/
|
||||
|
||||
echo 'Pulling tags from mozilla/normandy repo on Github...'
|
||||
pushd normandy
|
||||
git remote add mozilla https://github.com/mozilla/normandy.git
|
||||
git fetch mozilla
|
||||
popd
|
||||
|
||||
echo 'Syncing recipe-client-addon to mozilla-central...'
|
||||
pushd normandy/recipe-client-addon
|
||||
npm install
|
||||
./bin/update-mozilla-central.sh ../../mozilla-central/
|
||||
popd
|
||||
|
||||
echo 'Setting up environment'
|
||||
pushd mozilla-central
|
||||
source /root/.cargo/env
|
||||
python2.7 ./python/mozboot/bin/bootstrap.py --no-interactive --application-choice=browser_artifact_mode
|
||||
source /root/.cargo/env
|
||||
|
||||
echo 'Building Firefox'
|
||||
echo 'ac_add_options --enable-artifact-builds' > ./mozconfig
|
||||
mkdir /root/.mozbuild # Otherwise mach will hang forever asking for permission
|
||||
./mach build
|
||||
|
||||
echo 'Running tests'
|
||||
xvfb-run ./mach test browser/extensions/shield-recipe-client/
|
||||
|
||||
echo 'Packaging Firefox'
|
||||
./mach package
|
||||
popd
|
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
# Creates gecko-dev-master
|
||||
echo 'Downloading gecko-dev...'
|
||||
curl --location --fail --silent --show-error https://github.com/mozilla/gecko-dev/archive/master.tar.gz | tar xz
|
||||
|
||||
echo 'Pulling tags from mozilla/normandy repo on Github...'
|
||||
pushd normandy
|
||||
git remote add mozilla https://github.com/mozilla/normandy.git
|
||||
git fetch mozilla
|
||||
popd
|
||||
|
||||
echo 'Syncing recipe-client-addon to gecko-dev...'
|
||||
pushd normandy/recipe-client-addon
|
||||
npm install
|
||||
./bin/update-mozilla-central.sh ../../gecko-dev-master/
|
||||
popd
|
||||
|
||||
echo 'Making build tarball artifact'
|
||||
tar czf /artifacts/source.tar.gz gecko-dev-master
|
|
@ -4,17 +4,28 @@ set -eu
|
|||
# mach wants this
|
||||
export SHELL=$(which bash)
|
||||
|
||||
# Fetches source code from fetch task, and creates ./gecko-dev-master/
|
||||
echo 'Downloading fetch result'
|
||||
curl --location --fail --silent --show-error "$FETCH_RESULT" | tar xz
|
||||
# Creates mozilla-central
|
||||
echo 'Downloading mozilla-central...'
|
||||
hg clone http://hg.mozilla.org/mozilla-central/
|
||||
|
||||
echo 'Pulling tags from mozilla/normandy repo on Github...'
|
||||
pushd normandy
|
||||
git remote add mozilla https://github.com/mozilla/normandy.git
|
||||
git fetch mozilla
|
||||
popd
|
||||
|
||||
echo 'Syncing recipe-client-addon to mozilla-central...'
|
||||
pushd normandy/recipe-client-addon
|
||||
npm install
|
||||
./bin/update-mozilla-central.sh ../../mozilla-central/
|
||||
popd
|
||||
|
||||
echo 'Setting up environment'
|
||||
pushd gecko-dev-master
|
||||
pushd mozilla-central
|
||||
source /root/.cargo/env
|
||||
python2.7 ./python/mozboot/bin/bootstrap.py --no-interactive --application-choice=browser
|
||||
python2.7 ./python/mozboot/bin/bootstrap.py --no-interactive --application-choice=browser_artifact_mode
|
||||
source /root/.cargo/env
|
||||
|
||||
echo 'Running lints'
|
||||
./mach lint browser/extensions/shield-recipe-client/
|
||||
|
||||
popd
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
# mach wants this
|
||||
export SHELL=$(which bash)
|
||||
|
||||
# Fetches build results, and creates ./gecko-dev-master/
|
||||
echo 'Downloading build result'
|
||||
curl --location --fail --silent --show-error "$BUILD_RESULT" | tar xz
|
||||
|
||||
echo 'Setting up environment'
|
||||
pushd gecko-dev-master
|
||||
source /root/.cargo/env
|
||||
python2.7 ./python/mozboot/bin/bootstrap.py --no-interactive --application-choice=browser
|
||||
source /root/.cargo/env
|
||||
|
||||
echo 'Packaging Firefox'
|
||||
./mach package
|
||||
popd
|
|
@ -1,19 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
# mach wants this
|
||||
export SHELL=$(which bash)
|
||||
|
||||
# Fetches build results, and creates ./gecko-dev-master/
|
||||
echo 'Downloading build result'
|
||||
curl --location --fail --silent --show-error "$BUILD_RESULT" | tar xz
|
||||
|
||||
echo 'Setting up environment'
|
||||
pushd gecko-dev-master
|
||||
source /root/.cargo/env
|
||||
python2.7 ./python/mozboot/bin/bootstrap.py --no-interactive --application-choice=browser
|
||||
source /root/.cargo/env
|
||||
|
||||
echo 'Running tests'
|
||||
xvfb-run ./mach test browser/extensions/shield-recipe-client/
|
||||
popd
|
Загрузка…
Ссылка в новой задаче