mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1302763 - Move docker images out of testing/docker into taskcluster/docker; r=dustin
MozReview-Commit-ID: 7v1uCDB5qoN --HG-- rename : testing/docker/README.md => taskcluster/docker/README.md rename : testing/docker/REGISTRY => taskcluster/docker/REGISTRY rename : testing/docker/android-gradle-build/README.md => taskcluster/docker/android-gradle-build/README.md rename : testing/docker/image_builder/REGISTRY => taskcluster/docker/android-gradle-build/REGISTRY rename : testing/docker/android-gradle-build/VERSION => taskcluster/docker/android-gradle-build/VERSION rename : testing/docker/android-gradle-build/bin/after.sh => taskcluster/docker/android-gradle-build/bin/after.sh rename : testing/docker/android-gradle-build/bin/before.sh => taskcluster/docker/android-gradle-build/bin/before.sh rename : testing/docker/android-gradle-build/bin/build.sh => taskcluster/docker/android-gradle-build/bin/build.sh rename : testing/docker/desktop-build/bin/checkout-script.sh => taskcluster/docker/android-gradle-build/bin/checkout-script.sh rename : testing/docker/android-gradle-build/bin/checkout-sources.sh => taskcluster/docker/android-gradle-build/bin/checkout-sources.sh rename : testing/docker/desktop-build/buildprops.json => taskcluster/docker/android-gradle-build/buildprops.json rename : testing/docker/desktop-test/dot-files/config/pip/pip.conf => taskcluster/docker/android-gradle-build/dot-config/pip/pip.conf rename : testing/docker/desktop-build/oauth.txt => taskcluster/docker/android-gradle-build/oauth.txt rename : testing/docker/base-build/Dockerfile => taskcluster/docker/base-build/Dockerfile rename : testing/docker/base-build/VERSION => taskcluster/docker/base-build/VERSION rename : testing/docker/base-build/system-setup.sh => taskcluster/docker/base-build/system-setup.sh rename : testing/docker/base-test/Dockerfile => taskcluster/docker/base-test/Dockerfile rename : testing/docker/image_builder/REGISTRY => taskcluster/docker/base-test/REGISTRY rename : testing/docker/base-test/VERSION => taskcluster/docker/base-test/VERSION rename : testing/docker/base-test/sources.list => taskcluster/docker/base-test/sources.list rename : testing/docker/image_builder/REGISTRY => taskcluster/docker/builder/REGISTRY rename : testing/docker/centos6-build-upd/Dockerfile => taskcluster/docker/centos6-build-upd/Dockerfile rename : testing/docker/image_builder/REGISTRY => taskcluster/docker/centos6-build-upd/REGISTRY rename : testing/docker/centos6-build-upd/VERSION => taskcluster/docker/centos6-build-upd/VERSION rename : testing/docker/centos6-build/Dockerfile => taskcluster/docker/centos6-build/Dockerfile rename : testing/docker/image_builder/REGISTRY => taskcluster/docker/centos6-build/REGISTRY rename : testing/docker/decision/VERSION => taskcluster/docker/centos6-build/VERSION rename : testing/docker/centos6-build/hgrc => taskcluster/docker/centos6-build/hgrc rename : testing/docker/centos6-build/system-setup.sh => taskcluster/docker/centos6-build/system-setup.sh rename : testing/docker/decision/README.md => taskcluster/docker/decision/README.md rename : testing/docker/image_builder/REGISTRY => taskcluster/docker/decision/REGISTRY rename : testing/docker/decision/VERSION => taskcluster/docker/decision/VERSION rename : testing/docker/decision/system-setup.sh => taskcluster/docker/decision/system-setup.sh rename : testing/docker/desktop-build/bin/build.sh => taskcluster/docker/desktop-build/bin/build.sh rename : testing/docker/desktop-build/bin/checkout-script.sh => taskcluster/docker/desktop-build/bin/checkout-script.sh rename : testing/docker/desktop-build/bin/checkout-sources.sh => taskcluster/docker/desktop-build/bin/checkout-sources.sh rename : testing/docker/desktop-build/buildprops.json => taskcluster/docker/desktop-build/buildprops.json rename : testing/docker/desktop-test/dot-files/config/pip/pip.conf => taskcluster/docker/desktop-build/dot-config/pip/pip.conf rename : testing/docker/desktop-build/oauth.txt => taskcluster/docker/desktop-build/oauth.txt rename : testing/docker/desktop-test/apport => taskcluster/docker/desktop-test/apport rename : testing/docker/desktop-test/buildprops.json => taskcluster/docker/desktop-test/buildprops.json rename : testing/docker/desktop1604-test/deja-dup-monitor.desktop => taskcluster/docker/desktop-test/deja-dup-monitor.desktop rename : testing/docker/desktop-test/dot-files/config/pip/pip.conf => taskcluster/docker/desktop-test/dot-files/config/pip/pip.conf rename : testing/docker/desktop-test/dot-files/config/user-dirs.dirs => taskcluster/docker/desktop-test/dot-files/config/user-dirs.dirs rename : testing/docker/tester/dot-config/user-dirs.locale => taskcluster/docker/desktop-test/dot-files/config/user-dirs.locale rename : testing/docker/tester/dot-pulse/default.pa => taskcluster/docker/desktop-test/dot-files/pulse/default.pa rename : testing/docker/desktop1604-test/fonts.conf => taskcluster/docker/desktop-test/fonts.conf rename : testing/docker/desktop-test/jockey-gtk.desktop => taskcluster/docker/desktop-test/jockey-gtk.desktop rename : testing/docker/desktop-test/motd => taskcluster/docker/desktop-test/motd rename : testing/docker/desktop-test/release-upgrades => taskcluster/docker/desktop-test/release-upgrades rename : testing/docker/desktop-test/taskcluster-interactive-shell => taskcluster/docker/desktop-test/taskcluster-interactive-shell rename : testing/docker/desktop1604-test/tc-vcs-config.yml => taskcluster/docker/desktop-test/tc-vcs-config.yml rename : testing/docker/tester/tester.env => taskcluster/docker/desktop-test/tester.env rename : testing/docker/desktop-test/apport => taskcluster/docker/desktop1604-test/apport rename : testing/docker/desktop1604-test/bin/run-wizard => taskcluster/docker/desktop1604-test/bin/run-wizard rename : testing/docker/desktop-test/buildprops.json => taskcluster/docker/desktop1604-test/buildprops.json rename : testing/docker/desktop1604-test/deja-dup-monitor.desktop => taskcluster/docker/desktop1604-test/deja-dup-monitor.desktop rename : testing/docker/desktop-test/dot-files/config/pip/pip.conf => taskcluster/docker/desktop1604-test/dot-files/config/pip/pip.conf rename : testing/docker/desktop-test/dot-files/config/user-dirs.dirs => taskcluster/docker/desktop1604-test/dot-files/config/user-dirs.dirs rename : testing/docker/tester/dot-config/user-dirs.locale => taskcluster/docker/desktop1604-test/dot-files/config/user-dirs.locale rename : testing/docker/tester/dot-pulse/default.pa => taskcluster/docker/desktop1604-test/dot-files/pulse/default.pa rename : testing/docker/desktop1604-test/fonts.conf => taskcluster/docker/desktop1604-test/fonts.conf rename : testing/docker/desktop-test/jockey-gtk.desktop => taskcluster/docker/desktop1604-test/jockey-gtk.desktop rename : testing/docker/desktop-test/motd => taskcluster/docker/desktop1604-test/motd rename : testing/docker/desktop-test/release-upgrades => taskcluster/docker/desktop1604-test/release-upgrades rename : testing/docker/desktop1604-test/taskcluster-interactive-shell => taskcluster/docker/desktop1604-test/taskcluster-interactive-shell rename : testing/docker/desktop1604-test/tc-vcs-config.yml => taskcluster/docker/desktop1604-test/tc-vcs-config.yml rename : testing/docker/tester/tester.env => taskcluster/docker/desktop1604-test/tester.env rename : testing/docker/image_builder/Dockerfile => taskcluster/docker/image_builder/Dockerfile rename : testing/docker/image_builder/REGISTRY => taskcluster/docker/image_builder/REGISTRY rename : testing/docker/image_builder/VERSION => taskcluster/docker/image_builder/VERSION rename : testing/docker/image_builder/bin/build_image.sh => taskcluster/docker/image_builder/bin/build_image.sh rename : testing/docker/lint/system-setup.sh => taskcluster/docker/lint/system-setup.sh rename : testing/docker/recipes/centos6-build-system-setup.sh => taskcluster/docker/recipes/centos6-build-system-setup.sh rename : testing/docker/recipes/common.sh => taskcluster/docker/recipes/common.sh rename : testing/docker/recipes/install-mercurial.sh => taskcluster/docker/recipes/install-mercurial.sh rename : testing/docker/recipes/run-task => taskcluster/docker/recipes/run-task rename : testing/docker/recipes/tooltool.py => taskcluster/docker/recipes/tooltool.py rename : testing/docker/recipes/ubuntu1204-test-system-setup.sh => taskcluster/docker/recipes/ubuntu1204-test-system-setup.sh rename : testing/docker/recipes/ubuntu1604-test-system-setup.sh => taskcluster/docker/recipes/ubuntu1604-test-system-setup.sh rename : testing/docker/recipes/xvfb.sh => taskcluster/docker/recipes/xvfb.sh rename : testing/docker/rust-build/Dockerfile => taskcluster/docker/rust-build/Dockerfile rename : testing/docker/rust-build/README.md => taskcluster/docker/rust-build/README.md rename : testing/docker/rust-build/REGISTRY => taskcluster/docker/rust-build/REGISTRY rename : testing/docker/rust-build/VERSION => taskcluster/docker/rust-build/VERSION rename : testing/docker/rust-build/build_cargo.sh => taskcluster/docker/rust-build/build_cargo.sh rename : testing/docker/rust-build/build_rust.sh => taskcluster/docker/rust-build/build_rust.sh rename : testing/docker/rust-build/build_rust_mac.sh => taskcluster/docker/rust-build/build_rust_mac.sh rename : testing/docker/rust-build/fetch_cargo.sh => taskcluster/docker/rust-build/fetch_cargo.sh rename : testing/docker/rust-build/fetch_rust.sh => taskcluster/docker/rust-build/fetch_rust.sh rename : testing/docker/rust-build/package_rust.sh => taskcluster/docker/rust-build/package_rust.sh rename : testing/docker/rust-build/repack_rust.py => taskcluster/docker/rust-build/repack_rust.py rename : testing/docker/rust-build/task.json => taskcluster/docker/rust-build/task.json rename : testing/docker/rust-build/tcbuild.py => taskcluster/docker/rust-build/tcbuild.py rename : testing/docker/rust-build/upload_rust.sh => taskcluster/docker/rust-build/upload_rust.sh rename : testing/docker/tester/Dockerfile => taskcluster/docker/tester/Dockerfile rename : testing/docker/image_builder/REGISTRY => taskcluster/docker/tester/REGISTRY rename : testing/docker/tester/VERSION => taskcluster/docker/tester/VERSION rename : testing/docker/tester/bin/test.sh => taskcluster/docker/tester/bin/test.sh rename : testing/docker/desktop-test/dot-files/config/pip/pip.conf => taskcluster/docker/tester/dot-config/pip/pip.conf rename : testing/docker/tester/dot-config/user-dirs.dirs => taskcluster/docker/tester/dot-config/user-dirs.dirs rename : testing/docker/tester/dot-config/user-dirs.locale => taskcluster/docker/tester/dot-config/user-dirs.locale rename : testing/docker/tester/dot-pulse/default.pa => taskcluster/docker/tester/dot-pulse/default.pa rename : testing/docker/desktop1604-test/tc-vcs-config.yml => taskcluster/docker/tester/tc-vcs-config.yml rename : testing/docker/tester/tester.env => taskcluster/docker/tester/tester.env extra : rebase_source : 94c16b2ea7c5824e70637e7fb64a4f5dc3a02837
This commit is contained in:
parent
07411b2cc6
commit
69f1c6608d
1
AUTHORS
1
AUTHORS
@ -879,6 +879,7 @@ Ryan Flint <rflint@dslr.net>
|
||||
Ryan Jones <sciguyryan@gmail.com>
|
||||
Ryan VanderMeulen <ryanvm@gmail.com>
|
||||
Ryoichi Furukawa <oliver@1000cp.com>
|
||||
Sanyam Khurana <Sanyam.Khurana01@gmail.com>
|
||||
sagdjb@softwareag.com
|
||||
Samir Gehani <sgehani@netscape.com>
|
||||
Sammy Ford
|
||||
|
@ -63,7 +63,7 @@ jobs:
|
||||
when:
|
||||
files-changed:
|
||||
- "mobile/android/config/**"
|
||||
- "testing/docker/android-gradle-build/**"
|
||||
- "taskcluster/docker/android-gradle-build/**"
|
||||
- "testing/mozharness/configs/builds/releng_sub_android_configs/*gradle_dependencies.py"
|
||||
- "**/*.gradle"
|
||||
|
||||
|
@ -40,7 +40,7 @@ mozlint-eslint/opt:
|
||||
# Other misc lint related files.
|
||||
- 'python/mozlint/**'
|
||||
- 'tools/lint/**'
|
||||
- 'testing/docker/lint/**'
|
||||
- 'taskcluster/docker/lint/**'
|
||||
|
||||
mozlint-flake8/opt:
|
||||
description: flake8 run over the gecko codebase
|
||||
@ -66,7 +66,7 @@ mozlint-flake8/opt:
|
||||
- '**/.flake8'
|
||||
- 'python/mozlint/**'
|
||||
- 'tools/lint/**'
|
||||
- 'testing/docker/lint/**'
|
||||
- 'taskcluster/docker/lint/**'
|
||||
|
||||
wptlint-gecko/opt:
|
||||
description: web-platform-tests linter
|
||||
@ -94,4 +94,4 @@ wptlint-gecko/opt:
|
||||
- 'testing/web-platform/mozilla/meta/MANIFEST.json'
|
||||
- 'python/mozlint/**'
|
||||
- 'tools/lint/**'
|
||||
- 'testing/docker/lint/**'
|
||||
- 'taskcluster/docker/lint/**'
|
||||
|
@ -14,8 +14,8 @@ ADD bin /home/worker/bin
|
||||
RUN chmod +x /home/worker/bin/*
|
||||
|
||||
# Add wrapper scripts for xvfb allowing tasks to easily retry starting up xvfb
|
||||
# %include testing/docker/recipes/xvfb.sh
|
||||
ADD topsrcdir/testing/docker/recipes/xvfb.sh /home/worker/scripts/xvfb.sh
|
||||
# %include taskcluster/docker/recipes/xvfb.sh
|
||||
ADD topsrcdir/taskcluster/docker/recipes/xvfb.sh /home/worker/scripts/xvfb.sh
|
||||
|
||||
# Add configuration
|
||||
COPY dot-config /home/worker/.config
|
147
taskcluster/docker/b2g-build/Dockerfile
Normal file
147
taskcluster/docker/b2g-build/Dockerfile
Normal file
@ -0,0 +1,147 @@
|
||||
FROM centos:centos6
|
||||
MAINTAINER Dustin J. Mitchell <dustin@mozilla.com>
|
||||
|
||||
# Run majority of yum installs here so we cache them!
|
||||
COPY releng.repo /etc/yum.repos.d/releng.repo
|
||||
RUN yum install -y epel-release && \
|
||||
yum update -y && \
|
||||
yum makecache && \
|
||||
yum install -y wget
|
||||
|
||||
# Install updated curl libraries
|
||||
RUN cd /tmp && \
|
||||
wget https://s3-us-west-2.amazonaws.com/test-caching/libcurl-7.29.0-19.el6.x86_64.rpm && \
|
||||
wget https://s3-us-west-2.amazonaws.com/test-caching/libcurl-devel-7.29.0-19.el6.x86_64.rpm && \
|
||||
wget https://s3-us-west-2.amazonaws.com/test-caching/curl-7.29.0-19.el6.x86_64.rpm && \
|
||||
yum install -y libcurl-7.29.0-19.el6.x86_64.rpm libcurl-devel-7.29.0-19.el6.x86_64.rpm curl-7.29.0-19.el6.x86_64.rpm && \
|
||||
rm -f libcurl-7.29.0-19.el6.x86_64.rpm libcurl-devel-7.29.0-19.el6.x86_64.rpm curl-7.29.0-19.el6.x86_64.rpm && \
|
||||
cd -
|
||||
|
||||
RUN yum install -y \
|
||||
# From Building B2G docs
|
||||
# cmake \
|
||||
# cmake: is disabled intentionally to work around: bug 1141417
|
||||
GConf2-devel \
|
||||
alsa-lib-devel \
|
||||
autoconf213 \
|
||||
bc \
|
||||
bison \
|
||||
bzip2 \
|
||||
ccache \
|
||||
dbus-devel \
|
||||
dbus-glib-devel \
|
||||
dbus-glib-devel \
|
||||
dbus-python \
|
||||
expat-devel \
|
||||
file \
|
||||
flex \
|
||||
gawk \
|
||||
gcc473_0moz1 \
|
||||
gettext-devel \
|
||||
glibc-devel \
|
||||
glibc-devel.i686 \
|
||||
glibc-static \
|
||||
gstreamer-devel \
|
||||
gstreamer-plugins-base-devel \
|
||||
gtk2-devel \
|
||||
install \
|
||||
iw \
|
||||
libX11-devel \
|
||||
libX11-devel.i686 \
|
||||
libXrandr.i686 \
|
||||
libXt-devel \
|
||||
libnotify-devel \
|
||||
libstdc++-static \
|
||||
libstdc++-static \
|
||||
libstdc++.i686 \
|
||||
make \
|
||||
mesa-libGL-devel \
|
||||
mesa-libGL-devel.i686 \
|
||||
mozilla-python27 \
|
||||
mpfr-devel.x86_64 \
|
||||
ncurses-devel.i686 \
|
||||
ncurses:-devel \
|
||||
openssh-clients \
|
||||
openssl-devel \
|
||||
openssl-devel \
|
||||
patch \
|
||||
perl-DBI \
|
||||
perl-Digest-SHA \
|
||||
perl-ExtUtils-MakeMaker \
|
||||
pulseaudio-libs-devel \
|
||||
readline-devel.i686 \
|
||||
rsync \
|
||||
screen \
|
||||
subversion-perl \
|
||||
tar \
|
||||
tcl \
|
||||
tk \
|
||||
unzip \
|
||||
uuid \
|
||||
vim \
|
||||
wireless-tools-devel \
|
||||
xorg-x11-server-Xvfb \
|
||||
xorg-x11-server-utils \
|
||||
xz \
|
||||
yasm \
|
||||
zip \
|
||||
zlib-devel \
|
||||
zlib-devel.i686 && \
|
||||
# Remove cached packages. Cached package takes up a lot of space and
|
||||
# distributing them to workers is wasteful.
|
||||
yum clean all
|
||||
|
||||
RUN mkdir -p /home/worker/bin
|
||||
COPY bin/repository-url.py /home/worker/bin/repository-url.py
|
||||
|
||||
ENV GCC_PATH /home/worker/workspace/gecko/gcc
|
||||
|
||||
# Default to mozilla specific python, etc...
|
||||
ENV PATH /tools/python27-mercurial/bin:/tools/python27/bin:$PATH
|
||||
ENV PATH /tools/tools/buildfarm/utils:$PATH:/home/worker/bin/
|
||||
ENV PATH $GCC_PATH/bin:/tools/gcc-4.7.3-0moz1/bin:$PATH
|
||||
|
||||
# Use the libstd++ we installed over all others...
|
||||
env LD_LIBRARY_PATH=$GCC_PATH/lib64:$GCC_PATH/lib:/tools/gcc-4.7.3-0moz1/lib64:/tools/gcc-4.7.3-0moz1/lib
|
||||
|
||||
RUN useradd -d /home/worker -s /bin/bash -m worker
|
||||
|
||||
# Terrible symlink hacks so cc points to the gcc version we intend to use...
|
||||
RUN ls -lah /tools/gcc-4.7.3-0moz1/bin && ln -s /tools/gcc-4.7.3-0moz1/bin/gcc /tools/gcc-4.7.3-0moz1/bin/cc
|
||||
|
||||
# Terrible Hack to correctly install git-2.4.1
|
||||
RUN mkdir -p /tmp/git && cd /tmp/git && \
|
||||
curl -L https://s3-us-west-2.amazonaws.com/test-caching/git-2.4.1.tar.gz | tar -xz && \
|
||||
cd git* && \
|
||||
make prefix=/usr/local/ all -j10 && \
|
||||
make prefix=/usr/local/ install && \
|
||||
rm -Rf /tmp/git
|
||||
|
||||
# Install node from node's own dist...
|
||||
ENV NODE_VERSION v0.10.36
|
||||
RUN cd /usr/local/ && \
|
||||
curl https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-linux-x64.tar.gz | tar -xz --strip-components 1 && \
|
||||
node -v
|
||||
|
||||
RUN wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz && \
|
||||
tar -xvf setuptools-1.4.2.tar.gz && \
|
||||
cd setuptools-1.4.2 && python setup.py install && \
|
||||
cd - && rm -rf setuptools-1.4.2* && \
|
||||
curl https://bootstrap.pypa.io/get-pip.py | python - && \
|
||||
pip install virtualenv mercurial
|
||||
|
||||
# Generate machine uuid file
|
||||
RUN dbus-uuidgen --ensure=/var/lib/dbus/machine-id
|
||||
|
||||
# Set variable normally configured at login, by the shells parent process, these
|
||||
# are taken from GNU su manual
|
||||
ENV HOME /home/worker
|
||||
ENV SHELL /bin/bash
|
||||
ENV USER worker
|
||||
ENV LOGNAME worker
|
||||
|
||||
# Declare default working folder
|
||||
WORKDIR /home/worker
|
||||
|
||||
# Set a default command useful for debugging
|
||||
CMD ["/bin/bash", "--login"]
|
1
taskcluster/docker/b2g-build/VERSION
Normal file
1
taskcluster/docker/b2g-build/VERSION
Normal file
@ -0,0 +1 @@
|
||||
0.2.11
|
30
taskcluster/docker/b2g-build/bin/repository-url.py
Executable file
30
taskcluster/docker/b2g-build/bin/repository-url.py
Executable file
@ -0,0 +1,30 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
import argparse
|
||||
|
||||
|
||||
def repo_url(remote, revision, path):
|
||||
'''
|
||||
Construct a url pointing to the _raw_ file in the given remote this function
|
||||
will handle url construction for both hg and github.
|
||||
'''
|
||||
|
||||
# Ensure remote always ends in a slash...
|
||||
if remote[-1] != '/':
|
||||
remote = remote + '/'
|
||||
if 'hg.mozilla.org' in remote:
|
||||
return '{}raw-file/{}/{}'.format(remote, revision, path)
|
||||
else:
|
||||
return '{}raw/{}/{}'.format(remote, revision, path)
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Get url for raw file in remote repository'
|
||||
)
|
||||
|
||||
parser.add_argument('remote', help='URL for remote repository')
|
||||
parser.add_argument('revision', help='Revision in remote repository')
|
||||
parser.add_argument('path', help='Path to file in remote repository')
|
||||
|
||||
args = parser.parse_args()
|
||||
print(repo_url(args.remote, args.revision, args.path))
|
6
taskcluster/docker/b2g-build/releng.repo
Normal file
6
taskcluster/docker/b2g-build/releng.repo
Normal file
@ -0,0 +1,6 @@
|
||||
[releng]
|
||||
name=releng
|
||||
descr=releng-specific packages from mockbuild-repos
|
||||
baseurl=http://mockbuild-repos.pub.build.mozilla.org/releng/public/CentOS/6/x86_64
|
||||
enabled=1
|
||||
gpgcheck=0
|
32
taskcluster/docker/builder/Dockerfile
Normal file
32
taskcluster/docker/builder/Dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
FROM quay.io/mozilla/b2g-build:0.2.11
|
||||
MAINTAINER Dustin J. Mitchell <dustin@mozilla.com>
|
||||
|
||||
ENV VERSION 1.2
|
||||
ENV PYTHONPATH /tools/tools/lib/python:$PYTHONPATH
|
||||
ENV TOOLTOOL_CACHE /home/worker/tools/tooltool-cache
|
||||
|
||||
ADD https://raw.githubusercontent.com/taskcluster/buildbot-step/19219c470bd95b390ed0b31d4bf455169bf12fca/buildbot_step.js /home/worker/bin/buildbot_step
|
||||
|
||||
# Add utilities and configuration
|
||||
RUN mkdir -p /home/worker/bin /home/worker/tools
|
||||
# Add bin tools last as they are most likely to change
|
||||
RUN chown -R worker:worker /home/worker/* /home/worker/.*
|
||||
|
||||
# Instal build tools
|
||||
RUN hg clone http://hg.mozilla.org/build/tools/ /tools/tools && \
|
||||
cd /tools/tools && \
|
||||
python setup.py install
|
||||
|
||||
# Initialize git (makes repo happy)
|
||||
RUN git config --global user.email "mozilla@example.com" && \
|
||||
git config --global user.name "mozilla"
|
||||
|
||||
# VCS Tools
|
||||
RUN npm install -g taskcluster-vcs@2.3.17
|
||||
|
||||
# TODO enable worker
|
||||
# TODO volume mount permissions will be an issue
|
||||
# USER worker
|
||||
|
||||
COPY bin /home/worker/bin
|
||||
RUN chmod a+x /home/worker/bin/*
|
1
taskcluster/docker/builder/VERSION
Normal file
1
taskcluster/docker/builder/VERSION
Normal file
@ -0,0 +1 @@
|
||||
0.5.13
|
16
taskcluster/docker/builder/bin/checkout-gecko
Normal file
16
taskcluster/docker/builder/bin/checkout-gecko
Normal file
@ -0,0 +1,16 @@
|
||||
#! /bin/bash -ex
|
||||
|
||||
# Ensure we have at least enough to check gecko out...
|
||||
test $GECKO_BASE_REPOSITORY
|
||||
|
||||
# Workspace to checkout gecko into...
|
||||
WORKSPACE=$1
|
||||
mkdir -p $WORKSPACE
|
||||
|
||||
# Note that tc-vcs requires only the first two arguments so others are optional.
|
||||
# This is intended to make it easier to clone local directories.
|
||||
buildbot_step "Clone gecko" tc-vcs checkout $WORKSPACE/gecko \
|
||||
$GECKO_BASE_REPOSITORY \
|
||||
$GECKO_HEAD_REPOSITORY \
|
||||
$GECKO_HEAD_REV \
|
||||
$GECKO_HEAD_REF
|
6
taskcluster/docker/builder/git.env
Normal file
6
taskcluster/docker/builder/git.env
Normal file
@ -0,0 +1,6 @@
|
||||
GECKO_BASE_REPOSITORY=https://github.com/mozilla/gecko-dev
|
||||
GECKO_HEAD_REPOSITORY=https://github.com/mozilla/gecko-dev
|
||||
GECKO_HEAD_REF=master
|
||||
GECKO_HEAD_REV=master
|
||||
MOZHARNESS_REPOSITORY=http://hg.mozilla.org/build/mozharness
|
||||
MOZHARNESS_REV=tip
|
7
taskcluster/docker/builder/mulet.env
Normal file
7
taskcluster/docker/builder/mulet.env
Normal file
@ -0,0 +1,7 @@
|
||||
GECKO_BASE_REPOSITORY=https://github.com/mozilla/gecko-dev
|
||||
GECKO_HEAD_REPOSITORY=https://github.com/mozilla/gecko-dev
|
||||
GECKO_HEAD_REF=master
|
||||
GECKO_HEAD_REV=master
|
||||
MOZHARNESS_REPOSITORY=http://hg.mozilla.org/build/mozharness
|
||||
MOZHARNESS_REV=tip
|
||||
MOZCONFIG=b2g/dev/config/mozconfigs/linux64/mulet
|
25
taskcluster/docker/decision/Dockerfile
Normal file
25
taskcluster/docker/decision/Dockerfile
Normal file
@ -0,0 +1,25 @@
|
||||
FROM ubuntu:16.04
|
||||
MAINTAINER Greg Arndt <garndt@mozilla.com>
|
||||
|
||||
# Add worker user
|
||||
RUN useradd -d /home/worker -s /bin/bash -m worker
|
||||
RUN mkdir /home/worker/artifacts && chown worker:worker /home/worker/artifacts
|
||||
|
||||
# %include taskcluster/docker/recipes/tooltool.py
|
||||
ADD topsrcdir/taskcluster/docker/recipes/tooltool.py /tmp/tooltool.py
|
||||
|
||||
# %include taskcluster/docker/recipes/install-mercurial.sh
|
||||
ADD topsrcdir/taskcluster/docker/recipes/install-mercurial.sh /tmp/install-mercurial.sh
|
||||
|
||||
ADD system-setup.sh /tmp/system-setup.sh
|
||||
RUN bash /tmp/system-setup.sh
|
||||
|
||||
# %include taskcluster/docker/recipes/run-task
|
||||
ADD topsrcdir/taskcluster/docker/recipes/run-task /home/worker/bin/run-task
|
||||
|
||||
ENV PATH /home/worker/bin:$PATH
|
||||
ENV SHELL /bin/bash
|
||||
ENV HOME /home/worker
|
||||
|
||||
# Set a default command useful for debugging
|
||||
CMD ["/bin/bash", "--login"]
|
46
taskcluster/docker/desktop-build/Dockerfile
Normal file
46
taskcluster/docker/desktop-build/Dockerfile
Normal file
@ -0,0 +1,46 @@
|
||||
# TODO remove VOLUME below when the base image is updated next.
|
||||
FROM taskcluster/centos6-build-upd:0.1.6.20160329195300
|
||||
MAINTAINER Dustin J. Mitchell <dustin@mozilla.com>
|
||||
|
||||
# TODO remove when base image is updated
|
||||
VOLUME /home/worker/workspace
|
||||
VOLUME /home/worker/tooltool-cache
|
||||
|
||||
# Add build scripts; these are the entry points from the taskcluster worker, and
|
||||
# operate on environment variables
|
||||
ADD bin /home/worker/bin
|
||||
RUN chmod +x /home/worker/bin/*
|
||||
|
||||
# Add wrapper scripts for xvfb allowing tasks to easily retry starting up xvfb
|
||||
# %include taskcluster/docker/recipes/xvfb.sh
|
||||
ADD topsrcdir/taskcluster/docker/recipes/xvfb.sh /home/worker/scripts/xvfb.sh
|
||||
|
||||
# Add configuration
|
||||
COPY dot-config /home/worker/.config
|
||||
|
||||
# Generate machine uuid file
|
||||
RUN dbus-uuidgen --ensure=/var/lib/dbus/machine-id
|
||||
|
||||
# Stubbed out credentials; mozharness looks for this file an issues a WARNING
|
||||
# if it's not found, which causes the build to fail. Note that this needs to
|
||||
# be in the parent of the workspace directory and in the directory where
|
||||
# mozharness is run (not its --work-dir). See Bug 1169652.
|
||||
ADD oauth.txt /home/worker/
|
||||
|
||||
# stubbed out buildprops, which keeps mozharness from choking
|
||||
# Note that this needs to be in the parent of the workspace directory and in
|
||||
# the directory where mozharness is run (not its --work-dir)
|
||||
ADD buildprops.json /home/worker/
|
||||
|
||||
# install tooltool directly from github where tooltool_wrapper.sh et al. expect
|
||||
# to find it
|
||||
RUN wget -O /builds/tooltool.py https://raw.githubusercontent.com/mozilla/build-tooltool/master/tooltool.py
|
||||
RUN chmod +x /builds/tooltool.py
|
||||
|
||||
# Move installation to base centos6-build image once Bug 1272629 is fixed
|
||||
# Install the screen package here to use with xvfb.
|
||||
# Install bison to build binutils.
|
||||
RUN yum install -y bison screen
|
||||
|
||||
# Set a default command useful for debugging
|
||||
CMD ["/bin/bash", "--login"]
|
2
taskcluster/docker/desktop-build/dot-config/pip/pip.conf
Normal file
2
taskcluster/docker/desktop-build/dot-config/pip/pip.conf
Normal file
@ -0,0 +1,2 @@
|
||||
[global]
|
||||
disable-pip-version-check = true
|
106
taskcluster/docker/desktop-test/Dockerfile
Normal file
106
taskcluster/docker/desktop-test/Dockerfile
Normal file
@ -0,0 +1,106 @@
|
||||
FROM ubuntu:12.04
|
||||
MAINTAINER Jonas Finnemann Jensen <jopsen@gmail.com>
|
||||
|
||||
RUN useradd -d /home/worker -s /bin/bash -m worker
|
||||
WORKDIR /home/worker
|
||||
|
||||
# %include taskcluster/docker/recipes/tooltool.py
|
||||
ADD topsrcdir/taskcluster/docker/recipes/tooltool.py /setup/tooltool.py
|
||||
|
||||
# %include taskcluster/docker/recipes/install-mercurial.sh
|
||||
ADD topsrcdir/taskcluster/docker/recipes/install-mercurial.sh /tmp/install-mercurial.sh
|
||||
|
||||
# Add wrapper scripts for xvfb allowing tasks to easily retry starting up xvfb
|
||||
# %include taskcluster/docker/recipes/xvfb.sh
|
||||
ADD topsrcdir/taskcluster/docker/recipes/xvfb.sh /home/worker/scripts/xvfb.sh
|
||||
|
||||
# %include taskcluster/docker/recipes/ubuntu1204-test-system-setup.sh
|
||||
ADD topsrcdir/taskcluster/docker/recipes/ubuntu1204-test-system-setup.sh /setup/system-setup.sh
|
||||
RUN bash /setup/system-setup.sh
|
||||
|
||||
# %include taskcluster/docker/recipes/run-task
|
||||
ADD topsrcdir/taskcluster/docker/recipes/run-task /home/worker/bin/run-task
|
||||
|
||||
# %include taskcluster/scripts/tester/test-ubuntu.sh
|
||||
ADD topsrcdir/taskcluster/scripts/tester/test-ubuntu.sh /home/worker/bin/test-linux.sh
|
||||
|
||||
# This will create a host mounted filesystem when the cache is stripped
|
||||
# on Try. This cancels out some of the performance losses of aufs. See
|
||||
# bug 1291940.
|
||||
VOLUME /home/worker/hg-shared
|
||||
VOLUME /home/worker/checkouts
|
||||
VOLUME /home/worker/workspace
|
||||
|
||||
# Set variable normally configured at login, by the shells parent process, these
|
||||
# are taken from GNU su manual
|
||||
ENV HOME /home/worker
|
||||
ENV SHELL /bin/bash
|
||||
ENV USER worker
|
||||
ENV LOGNAME worker
|
||||
ENV HOSTNAME taskcluster-worker
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
# Add utilities and configuration
|
||||
COPY dot-files/config /home/worker/.config
|
||||
COPY dot-files/pulse /home/worker/.pulse
|
||||
RUN chmod +x bin/*
|
||||
# TODO: remove this when buildbot is gone
|
||||
COPY buildprops.json /home/worker/buildprops.json
|
||||
COPY tc-vcs-config.yml /etc/taskcluster-vcs.yml
|
||||
|
||||
# TODO: remove
|
||||
ADD https://raw.githubusercontent.com/taskcluster/buildbot-step/master/buildbot_step /home/worker/bin/buildbot_step
|
||||
RUN chmod u+x /home/worker/bin/buildbot_step
|
||||
|
||||
# TODO: remove
|
||||
ADD https://s3-us-west-2.amazonaws.com/test-caching/packages/linux64-stackwalk /usr/local/bin/linux64-minidump_stackwalk
|
||||
RUN chmod +x /usr/local/bin/linux64-minidump_stackwalk
|
||||
|
||||
# allow the worker user to access video devices
|
||||
RUN usermod -a -G video worker
|
||||
|
||||
RUN mkdir Documents; mkdir Pictures; mkdir Music; mkdir Videos; mkdir artifacts
|
||||
|
||||
# install tc-vcs and tc-npm-cache
|
||||
RUN npm install -g taskcluster-vcs@2.3.12 \
|
||||
&& npm install -g taskcluster-npm-cache@1.1.14 \
|
||||
&& rm -rf ~/.npm
|
||||
ENV PATH $PATH:/home/worker/bin
|
||||
|
||||
# TODO Re-enable worker when bug 1093833 lands
|
||||
#USER worker
|
||||
|
||||
# clean up
|
||||
RUN rm -Rf .cache && mkdir -p .cache
|
||||
|
||||
# Disable Ubuntu update prompt
|
||||
# http://askubuntu.com/questions/515161/ubuntu-12-04-disable-release-notification-of-14-04-in-update-manager
|
||||
ADD release-upgrades /etc/update-manager/release-upgrades
|
||||
|
||||
# Disable tools with on-login popups that interfere with tests; see bug 1240084 and bug 984944.
|
||||
ADD jockey-gtk.desktop deja-dup-monitor.desktop /etc/xdg/autostart/
|
||||
|
||||
# In test.sh we accept START_VNC to start a vnc daemon.
|
||||
# Exposing this port allows it to work.
|
||||
EXPOSE 5900
|
||||
|
||||
# This helps not forgetting setting DISPLAY=:0 when running
|
||||
# tests outside of test.sh
|
||||
ENV DISPLAY :0
|
||||
|
||||
# Disable apport (Ubuntu app crash reporter) to avoid stealing focus from test runs
|
||||
ADD apport /etc/default/apport
|
||||
|
||||
# Disable font antialiasing for now to match releng's setup
|
||||
ADD fonts.conf /home/worker/.fonts.conf
|
||||
|
||||
# Set up first-run experience for interactive mode
|
||||
ADD motd /etc/taskcluster-motd
|
||||
ADD taskcluster-interactive-shell /bin/taskcluster-interactive-shell
|
||||
RUN chmod +x /bin/taskcluster-interactive-shell
|
||||
|
||||
RUN chown -R worker:worker /home/worker
|
||||
|
||||
# Set a default command useful for debugging
|
||||
CMD ["/bin/bash", "--login"]
|
@ -0,0 +1,2 @@
|
||||
[global]
|
||||
disable-pip-version-check = true
|
108
taskcluster/docker/desktop1604-test/Dockerfile
Normal file
108
taskcluster/docker/desktop1604-test/Dockerfile
Normal file
@ -0,0 +1,108 @@
|
||||
FROM ubuntu:16.04
|
||||
MAINTAINER Joel Maher <joel.maher@gmail.com>
|
||||
|
||||
RUN useradd -d /home/worker -s /bin/bash -m worker
|
||||
WORKDIR /home/worker
|
||||
|
||||
# %include taskcluster/docker/recipes/tooltool.py
|
||||
ADD topsrcdir/taskcluster/docker/recipes/tooltool.py /setup/tooltool.py
|
||||
|
||||
# %include taskcluster/docker/recipes/install-mercurial.sh
|
||||
ADD topsrcdir/taskcluster/docker/recipes/install-mercurial.sh /setup/install-mercurial.sh
|
||||
|
||||
# %include taskcluster/docker/recipes/ubuntu1604-test-system-setup.sh
|
||||
ADD topsrcdir/taskcluster/docker/recipes/ubuntu1604-test-system-setup.sh /setup/system-setup.sh
|
||||
RUN bash /setup/system-setup.sh
|
||||
|
||||
# Add wrapper scripts for xvfb allowing tasks to easily retry starting up xvfb
|
||||
# %include taskcluster/docker/recipes/xvfb.sh
|
||||
ADD topsrcdir/taskcluster/docker/recipes/xvfb.sh /home/worker/scripts/xvfb.sh
|
||||
|
||||
# %include taskcluster/docker/recipes/run-task
|
||||
ADD topsrcdir/taskcluster/docker/recipes/run-task /home/worker/bin/run-task
|
||||
|
||||
# %include taskcluster/scripts/tester/test-ubuntu.sh
|
||||
ADD topsrcdir/taskcluster/scripts/tester/test-ubuntu.sh /home/worker/bin/test-linux.sh
|
||||
|
||||
# This will create a host mounted filesystem when the cache is stripped
|
||||
# on Try. This cancels out some of the performance losses of aufs. See
|
||||
# bug 1291940.
|
||||
VOLUME /home/worker/hg-shared
|
||||
VOLUME /home/worker/checkouts
|
||||
VOLUME /home/worker/workspace
|
||||
|
||||
# Set variable normally configured at login, by the shells parent process, these
|
||||
# are taken from GNU su manual
|
||||
ENV HOME /home/worker
|
||||
ENV SHELL /bin/bash
|
||||
ENV USER worker
|
||||
ENV LOGNAME worker
|
||||
ENV HOSTNAME taskcluster-worker
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
# Add utilities and configuration
|
||||
COPY dot-files/config /home/worker/.config
|
||||
COPY dot-files/pulse /home/worker/.pulse
|
||||
COPY bin /home/worker/bin
|
||||
RUN chmod +x bin/*
|
||||
# TODO: remove this when buildbot is gone
|
||||
COPY buildprops.json /home/worker/buildprops.json
|
||||
COPY tc-vcs-config.yml /etc/taskcluster-vcs.yml
|
||||
|
||||
# TODO: remove
|
||||
ADD https://raw.githubusercontent.com/taskcluster/buildbot-step/master/buildbot_step /home/worker/bin/buildbot_step
|
||||
RUN chmod u+x /home/worker/bin/buildbot_step
|
||||
|
||||
# TODO: remove
|
||||
ADD https://s3-us-west-2.amazonaws.com/test-caching/packages/linux64-stackwalk /usr/local/bin/linux64-minidump_stackwalk
|
||||
RUN chmod +x /usr/local/bin/linux64-minidump_stackwalk
|
||||
|
||||
# allow the worker user to access video devices
|
||||
RUN usermod -a -G video worker
|
||||
|
||||
RUN mkdir Documents; mkdir Pictures; mkdir Music; mkdir Videos; mkdir artifacts
|
||||
|
||||
# install a new enough npm, plus tc-vcs and tc-npm-cache
|
||||
RUN npm install -g npm@^2.0.0 \
|
||||
&& npm install -g taskcluster-vcs@2.3.12 \
|
||||
&& npm install -g taskcluster-npm-cache@1.1.14 \
|
||||
&& rm -rf ~/.npm
|
||||
ENV PATH $PATH:/home/worker/bin
|
||||
|
||||
# TODO Re-enable worker when bug 1093833 lands
|
||||
#USER worker
|
||||
|
||||
# clean up
|
||||
RUN rm -Rf .cache && mkdir -p .cache
|
||||
|
||||
# Disable Ubuntu update prompt
|
||||
# http://askubuntu.com/questions/515161/ubuntu-12-04-disable-release-notification-of-14-04-in-update-manager
|
||||
ADD release-upgrades /etc/update-manager/release-upgrades
|
||||
|
||||
# Disable tools with on-login popups that interfere with tests; see bug 1240084 and bug 984944.
|
||||
ADD jockey-gtk.desktop deja-dup-monitor.desktop /etc/xdg/autostart/
|
||||
|
||||
# In test.sh we accept START_VNC to start a vnc daemon.
|
||||
# Exposing this port allows it to work.
|
||||
EXPOSE 5900
|
||||
|
||||
# This helps not forgetting setting DISPLAY=:0 when running
|
||||
# tests outside of test.sh
|
||||
ENV DISPLAY :0
|
||||
|
||||
# Disable apport (Ubuntu app crash reporter) to avoid stealing focus from test runs
|
||||
ADD apport /etc/default/apport
|
||||
|
||||
# Disable font antialiasing for now to match releng's setup
|
||||
ADD fonts.conf /home/worker/.fonts.conf
|
||||
|
||||
# Set up first-run experience for interactive mode
|
||||
ADD motd /etc/taskcluster-motd
|
||||
ADD taskcluster-interactive-shell /bin/taskcluster-interactive-shell
|
||||
RUN chmod +x /bin/taskcluster-interactive-shell
|
||||
|
||||
RUN chown -R worker:worker /home/worker
|
||||
|
||||
# Set a default command useful for debugging
|
||||
CMD ["/bin/bash", "--login"]
|
@ -0,0 +1,2 @@
|
||||
[global]
|
||||
disable-pip-version-check = true
|
31
taskcluster/docker/lint/Dockerfile
Normal file
31
taskcluster/docker/lint/Dockerfile
Normal file
@ -0,0 +1,31 @@
|
||||
FROM ubuntu:16.04
|
||||
MAINTAINER Andrew Halberstadt <ahalberstadt@mozilla.com>
|
||||
|
||||
RUN useradd -d /home/worker -s /bin/bash -m worker
|
||||
WORKDIR /home/worker
|
||||
|
||||
RUN mkdir /build
|
||||
# %include taskcluster/docker/recipes/tooltool.py
|
||||
ADD topsrcdir/taskcluster/docker/recipes/tooltool.py /build/tooltool.py
|
||||
|
||||
# %include taskcluster/docker/recipes/install-mercurial.sh
|
||||
ADD topsrcdir/taskcluster/docker/recipes/install-mercurial.sh /build/install-mercurial.sh
|
||||
ADD system-setup.sh /tmp/system-setup.sh
|
||||
RUN bash /tmp/system-setup.sh
|
||||
|
||||
# %include taskcluster/docker/recipes/run-task
|
||||
ADD topsrcdir/taskcluster/docker/recipes/run-task /home/worker/bin/run-task
|
||||
RUN chown -R worker:worker /home/worker/bin && chmod 755 /home/worker/bin/*
|
||||
|
||||
# Set variable normally configured at login, by the shells parent process, these
|
||||
# are taken from GNU su manual
|
||||
ENV HOME /home/worker
|
||||
ENV SHELL /bin/bash
|
||||
ENV USER worker
|
||||
ENV LOGNAME worker
|
||||
ENV HOSTNAME taskcluster-worker
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
# Set a default command useful for debugging
|
||||
CMD ["/bin/bash", "--login"]
|
17
taskcluster/docker/phone-builder/Dockerfile
Normal file
17
taskcluster/docker/phone-builder/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM taskcluster/builder:0.5.13
|
||||
MAINTAINER Wander Lairson Costa <wcosta@mozilla.com>
|
||||
|
||||
# Add utilities and configuration
|
||||
ADD bin /home/worker/bin
|
||||
|
||||
# Builds need the share module enabled
|
||||
ADD hgrc /home/worker/.hgrc
|
||||
RUN chown -R worker:worker /home/worker/.hgrc
|
||||
|
||||
# Make sure we use our own config
|
||||
COPY tc-vcs-config.yml /etc/taskcluster-vcs.yml
|
||||
|
||||
RUN yum install -y bc lzop java-1.7.0-openjdk
|
||||
RUN pip install awscli
|
||||
RUN npm install -g bower gulp apm grunt-cli
|
||||
|
72
taskcluster/docker/phone-builder/bin/validate_task.py
Executable file
72
taskcluster/docker/phone-builder/bin/validate_task.py
Executable file
@ -0,0 +1,72 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
import os
|
||||
import os.path
|
||||
import json
|
||||
import urllib2
|
||||
import sys
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
repo_matcher = re.compile(r'[a-z]+://(hg|git)\.mozilla\.org')
|
||||
|
||||
|
||||
def get_task(taskid):
|
||||
return json.load(
|
||||
urllib2.urlopen('https://queue.taskcluster.net/v1/task/' + taskid))
|
||||
|
||||
|
||||
def check_task(task):
|
||||
payload = task['payload']
|
||||
|
||||
if 'GECKO_HEAD_REPOSITORY' not in payload['env']:
|
||||
print('Task has no head gecko repository', file=sys.stderr)
|
||||
return -1
|
||||
|
||||
repo = payload['env']['GECKO_HEAD_REPOSITORY']
|
||||
# if it is not a mozilla repository, fail
|
||||
if not repo_matcher.match(repo):
|
||||
print('Invalid head repository', repo, file=sys.stderr)
|
||||
return -1
|
||||
|
||||
if 'GECKO_BASE_REPOSITORY' not in payload['env']:
|
||||
print('Task has no base gecko repository', file=sys.stderr)
|
||||
return -1
|
||||
|
||||
repo = payload['env']['GECKO_BASE_REPOSITORY']
|
||||
if not repo_matcher.match(repo):
|
||||
print('Invalid base repository', repo, file=sys.stderr)
|
||||
return -1
|
||||
|
||||
locations = task["extra"]["locations"]
|
||||
if "img" in locations:
|
||||
img = locations["img"]
|
||||
if img.startswith("public"):
|
||||
print('Cannot upload images to public', file=sys.stderr)
|
||||
return -1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
def main():
|
||||
taskid = os.getenv('TASK_ID')
|
||||
|
||||
# If the task id is None, we assume we are running docker locally
|
||||
if taskid is not None:
|
||||
task = get_task(taskid)
|
||||
ret = check_task(task)
|
||||
if ret != 0:
|
||||
return ret
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
try:
|
||||
return subprocess.call(sys.argv[1:], shell=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
return e.returncode
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
4
taskcluster/docker/phone-builder/hgrc
Normal file
4
taskcluster/docker/phone-builder/hgrc
Normal file
@ -0,0 +1,4 @@
|
||||
[extensions]
|
||||
share =
|
||||
[ui]
|
||||
username = TaskCluster <nobody@mozilla.org>
|
40
taskcluster/docker/phone-builder/tc-vcs-config.yml
Normal file
40
taskcluster/docker/phone-builder/tc-vcs-config.yml
Normal file
@ -0,0 +1,40 @@
|
||||
# Default configuration used by the tc-vs tools these can be overridden by
|
||||
# passing the config you wish to use over the command line...
|
||||
git: git
|
||||
hg: hg
|
||||
|
||||
repoCache:
|
||||
# Repo url to clone when running repo init..
|
||||
repoUrl: https://gerrit.googlesource.com/git-repo.git
|
||||
# Version of repo to utilize...
|
||||
repoRevision: master
|
||||
# The root where all downloaded cache files are stored on the local machine...
|
||||
cacheDir: '{{env.HOME}}/.tc-vcs-repo/'
|
||||
# Name/prefixed used as part of the base url.
|
||||
cacheName: sources/{{name}}.tar.gz
|
||||
# Command used to upload the tarball
|
||||
uploadTar: "curl --retry 5 --fail --header 'Content-Type: application/x-tar' --header 'Content-Encoding: gzip' -X PUT --data-binary @'{{source}}' '{{url}}'"
|
||||
# Large http get requests are often slower using nodes built in http layer so
|
||||
# we utilize a subprocess which is responsible for fetching...
|
||||
get: curl --retry 5 --fail -L -o {{dest}} {{url}}
|
||||
# Used to create clone tarball
|
||||
compress: tar -czf {{dest}} {{source}}
|
||||
# All cache urls use tar + gz this is the command used to extract those files
|
||||
# downloaded by the "get" command.
|
||||
extract: tar -x -z -C {{dest}} -f {{source}}
|
||||
|
||||
cloneCache:
|
||||
# The root where all downloaded cache files are stored on the local machine...
|
||||
cacheDir: '{{env.HOME}}/.tc-vcs/'
|
||||
# Command used to upload the tarball
|
||||
uploadTar: "curl --retry 5 --fail --header 'Content-Type: application/x-tar' --header 'Content-Encoding: gzip' -X PUT --data-binary @'{{source}}' '{{url}}'"
|
||||
# Large http get requests are often slower using nodes built in http layer so
|
||||
# we utilize a subprocess which is responsible for fetching...
|
||||
get: curl --retry 5 --fail -L -o {{dest}} {{url}}
|
||||
# Used to create clone tarball
|
||||
compress: tar -czf {{dest}} {{source}}
|
||||
# All cache urls use tar + gz this is the command used to extract those files
|
||||
# downloaded by the "get" command.
|
||||
extract: tar -x -z --strip-components 1 -C {{dest}} -f {{source}}
|
||||
# Name/prefixed used as part of the base url.
|
||||
cacheName: clones/{{name}}.tar.gz
|
50
taskcluster/docker/phone-builder/tests/invalid_base_repo.yml
Normal file
50
taskcluster/docker/phone-builder/tests/invalid_base_repo.yml
Normal file
@ -0,0 +1,50 @@
|
||||
taskId: 1
|
||||
task:
|
||||
metadata:
|
||||
source: http://todo.com/soon
|
||||
owner: user@domain.com
|
||||
name: B2G Emulator
|
||||
description: B2G Emulator
|
||||
|
||||
workerType: b2gbuild
|
||||
provisionerId: aws-provisioner
|
||||
|
||||
scopes:
|
||||
- 'docker-worker:cache:build-emulator-objects'
|
||||
- 'docker-worker:image:quay.io/mozilla/phone-builder:0.0.1'
|
||||
|
||||
payload:
|
||||
cache:
|
||||
build-emulator-objects: '/home/worker/object-folder-flame-kk-1'
|
||||
|
||||
env:
|
||||
TARGET: 'flame-kk'
|
||||
B2G_DEBUG: '1'
|
||||
# revision/project params defined originally here https://github.com/taskcluster/taskcluster-try/blob/master/try/instantiate.js
|
||||
REVISION: 'tip'
|
||||
GECKO_HEAD_REPOSITORY: 'http://hg.mozilla.org/mozilla-central'
|
||||
GECKO_BASE_REPOSITORY: 'git@github.com:mozilla/gecko-dev.git'
|
||||
|
||||
image: 'quay.io/mozilla/phone-builder:0.0.1'
|
||||
maxRunTime: 14400
|
||||
|
||||
command:
|
||||
- build-phone.sh
|
||||
|
||||
artifacts:
|
||||
'private/build':
|
||||
type: directory
|
||||
path: '/home/worker/artifacts/'
|
||||
|
||||
extra:
|
||||
# Rather then enforcing particular conventions we require that all build
|
||||
# tasks provide the "build" extra field to specify where the build and tests
|
||||
# files are located.
|
||||
locations:
|
||||
build: 'private/build/emulator.tar.gz'
|
||||
tests: 'private/build/b2g-tests.zip'
|
||||
symbols: 'private/build/b2g-crashreporter-symbols.zip'
|
||||
sources: 'private/build/sources.xml'
|
||||
|
||||
treeherder:
|
||||
symbol: B
|
50
taskcluster/docker/phone-builder/tests/invalid_head_repo.yml
Normal file
50
taskcluster/docker/phone-builder/tests/invalid_head_repo.yml
Normal file
@ -0,0 +1,50 @@
|
||||
taskId: 1
|
||||
task:
|
||||
metadata:
|
||||
source: http://todo.com/soon
|
||||
owner: user@domain.com
|
||||
name: B2G Emulator
|
||||
description: B2G Emulator
|
||||
|
||||
workerType: b2gbuild
|
||||
provisionerId: aws-provisioner
|
||||
|
||||
scopes:
|
||||
- 'docker-worker:cache:build-emulator-objects'
|
||||
- 'docker-worker:image:quay.io/mozilla/phone-builder:0.0.1'
|
||||
|
||||
payload:
|
||||
cache:
|
||||
build-emulator-objects: '/home/worker/object-folder-flame-kk-1'
|
||||
|
||||
env:
|
||||
TARGET: 'flame-kk'
|
||||
B2G_DEBUG: '1'
|
||||
# revision/project params defined originally here https://github.com/taskcluster/taskcluster-try/blob/master/try/instantiate.js
|
||||
REVISION: 'tip'
|
||||
GECKO_HEAD_REPOSITORY: 'git@github.com:mozilla/gecko-dev.git'
|
||||
GECKO_BASE_REPOSITORY: 'http://hg.mozilla.org/mozilla-central'
|
||||
|
||||
image: 'quay.io/mozilla/phone-builder:0.0.1'
|
||||
maxRunTime: 14400
|
||||
|
||||
command:
|
||||
- build-phone.sh
|
||||
|
||||
artifacts:
|
||||
'private/build':
|
||||
type: directory
|
||||
path: '/home/worker/artifacts/'
|
||||
|
||||
extra:
|
||||
# Rather then enforcing particular conventions we require that all build
|
||||
# tasks provide the "build" extra field to specify where the build and tests
|
||||
# files are located.
|
||||
locations:
|
||||
build: 'private/build/emulator.tar.gz'
|
||||
tests: 'private/build/b2g-tests.zip'
|
||||
symbols: 'private/build/b2g-crashreporter-symbols.zip'
|
||||
sources: 'private/build/sources.xml'
|
||||
|
||||
treeherder:
|
||||
symbol: B
|
50
taskcluster/docker/phone-builder/tests/public.yml
Normal file
50
taskcluster/docker/phone-builder/tests/public.yml
Normal file
@ -0,0 +1,50 @@
|
||||
taskId: 1
|
||||
task:
|
||||
metadata:
|
||||
source: http://todo.com/soon
|
||||
owner: user@domain.com
|
||||
name: B2G Emulator
|
||||
description: B2G Emulator
|
||||
|
||||
workerType: b2gbuild
|
||||
provisionerId: aws-provisioner
|
||||
|
||||
scopes:
|
||||
- 'docker-worker:cache:build-emulator-objects'
|
||||
- 'docker-worker:image:quay.io/mozilla/phone-builder:0.0.1'
|
||||
|
||||
payload:
|
||||
cache:
|
||||
build-emulator-objects: '/home/worker/object-folder-flame-kk-1'
|
||||
|
||||
env:
|
||||
TARGET: 'flame-kk'
|
||||
B2G_DEBUG: '1'
|
||||
# revision/project params defined originally here https://github.com/taskcluster/taskcluster-try/blob/master/try/instantiate.js
|
||||
REVISION: 'tip'
|
||||
GECKO_HEAD_REPOSITORY: 'http://hg.mozilla.org/mozilla-central'
|
||||
GECKO_BASE_REPOSITORY: 'http://hg.mozilla.org/mozilla-central'
|
||||
|
||||
image: 'quay.io/mozilla/phone-builder:0.0.1'
|
||||
maxRunTime: 14400
|
||||
|
||||
command:
|
||||
- build-phone.sh
|
||||
|
||||
artifacts:
|
||||
'public/build':
|
||||
type: directory
|
||||
path: '/home/worker/artifacts/'
|
||||
|
||||
extra:
|
||||
# Rather then enforcing particular conventions we require that all build
|
||||
# tasks provide the "build" extra field to specify where the build and tests
|
||||
# files are located.
|
||||
locations:
|
||||
build: 'public/build/emulator.tar.gz'
|
||||
tests: 'public/build/b2g-tests.zip'
|
||||
symbols: 'public/build/b2g-crashreporter-symbols.zip'
|
||||
sources: 'public/build/sources.xml'
|
||||
|
||||
treeherder:
|
||||
symbol: B
|
35
taskcluster/docker/phone-builder/tests/test_validation.py
Executable file
35
taskcluster/docker/phone-builder/tests/test_validation.py
Executable file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import unittest
|
||||
import sys
|
||||
import yaml
|
||||
|
||||
from validate_task import check_task
|
||||
sys.path.append('../bin')
|
||||
|
||||
|
||||
def load_task(task_file):
|
||||
content = open(task_file, 'r')
|
||||
return yaml.load(content)['task']
|
||||
|
||||
|
||||
class TaskValidationTest(unittest.TestCase):
|
||||
def test_valid_task(self):
|
||||
task = load_task('valid.yml')
|
||||
self.assertEquals(check_task(task), 0)
|
||||
|
||||
def test_invalid_base_repo(self):
|
||||
task = load_task('invalid_base_repo.yml')
|
||||
self.assertEquals(check_task(task), -1)
|
||||
|
||||
def test_invalid_head_repo(self):
|
||||
task = load_task('invalid_head_repo.yml')
|
||||
self.assertEquals(check_task(task), -1)
|
||||
|
||||
def test_public_artifact(self):
|
||||
task = load_task('public.yml')
|
||||
self.assertEquals(check_task(task), -1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
53
taskcluster/docker/phone-builder/tests/valid.yml
Normal file
53
taskcluster/docker/phone-builder/tests/valid.yml
Normal file
@ -0,0 +1,53 @@
|
||||
taskId: 1
|
||||
task:
|
||||
metadata:
|
||||
source: http://todo.com/soon
|
||||
owner: user@domain.com
|
||||
name: B2G flame-kk opt
|
||||
description: B2G flame-kk opt
|
||||
|
||||
workerType: b2gbuild
|
||||
provisionerId: aws-provisioner
|
||||
|
||||
scopes:
|
||||
- 'docker-worker:cache:build-phone-objects'
|
||||
- 'docker-worker:image:{{#docker_image}}phone-builder{{/docker_image}}'
|
||||
|
||||
payload:
|
||||
cache:
|
||||
build-phone-objects: '/home/worker/object-folder-flame-kk-1'
|
||||
|
||||
env:
|
||||
TARGET: 'flame-kk'
|
||||
B2G_DEBUG: '1'
|
||||
# revision/project params defined originally here https://github.com/taskcluster/taskcluster-try/blob/master/try/instantiate.js
|
||||
REVISION: 'tip'
|
||||
GECKO_HEAD_REPOSITORY: 'http://hg.mozilla.org/mozilla-central'
|
||||
GECKO_BASE_REPOSITORY: 'http://hg.mozilla.org/mozilla-central'
|
||||
|
||||
image: '{{#docker_image}}phone-builder{{/docker_image}}'
|
||||
maxRunTime: 14400
|
||||
|
||||
command:
|
||||
- build-phone.sh
|
||||
|
||||
artifacts:
|
||||
'private/build':
|
||||
type: directory
|
||||
path: '/home/worker/artifacts/'
|
||||
expires:
|
||||
relative-datestamp: '1 year'
|
||||
|
||||
extra:
|
||||
# Rather then enforcing particular conventions we require that all build
|
||||
# tasks provide the "build" extra field to specify where the build and tests
|
||||
# files are located.
|
||||
locations:
|
||||
build: 'private/build/b2g-android-arm.tar.gz'
|
||||
img: 'private/build/flame-kk.zip'
|
||||
tests: 'private/build/gaia.zip'
|
||||
symbols: 'private/build/b2g-crashreporter-symbols.zip'
|
||||
sources: 'private/build/sources.xml'
|
||||
|
||||
treeherder:
|
||||
symbol: B
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user