diff --git a/testing/docker/desktop32-build/Dockerfile b/testing/docker/desktop32-build/Dockerfile new file mode 100644 index 00000000000..e041841fefd --- /dev/null +++ b/testing/docker/desktop32-build/Dockerfile @@ -0,0 +1,32 @@ +FROM quay.io/mrrrgn/ubuntu32-build:0.0.1 +MAINTAINER Morgan Reece Phillips + +# 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/* + +## +# COMPILER HACKS +## +ADD hacks.sh /tmp/ +RUN /tmp/hacks.sh + +# So that the compilers can find necessary libraries +# gcc +ENV LIBRARY_PATH /usr/lib/i386-linux-gnu +ENV PKG_CONFIG_PATH /usr/lib/i386-linux-gnu/pkgconfig + +# 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/ + +# Set a default command useful for debugging +CMD ["/bin/bash", "--login"] diff --git a/testing/docker/desktop32-build/REGISTRY b/testing/docker/desktop32-build/REGISTRY new file mode 100644 index 00000000000..e9d3e6915d9 --- /dev/null +++ b/testing/docker/desktop32-build/REGISTRY @@ -0,0 +1 @@ +quay.io/mrrrgn diff --git a/testing/docker/desktop32-build/VERSION b/testing/docker/desktop32-build/VERSION new file mode 100644 index 00000000000..77d6f4ca237 --- /dev/null +++ b/testing/docker/desktop32-build/VERSION @@ -0,0 +1 @@ +0.0.0 diff --git a/testing/docker/desktop32-build/bin/build.sh b/testing/docker/desktop32-build/bin/build.sh new file mode 100644 index 00000000000..4151ed2b2a5 --- /dev/null +++ b/testing/docker/desktop32-build/bin/build.sh @@ -0,0 +1,12 @@ +#! /bin/bash -vex + +set -x -e -v + +#### +# The default build works for any fx_desktop_build based mozharness job: +# via linux-build.sh +#### + +. $HOME/bin/checkout-sources.sh + +. $WORKSPACE/build/src/testing/taskcluster/scripts/builder/build-linux.sh diff --git a/testing/docker/desktop32-build/bin/checkout-sources.sh b/testing/docker/desktop32-build/bin/checkout-sources.sh new file mode 100644 index 00000000000..6cc2acfb759 --- /dev/null +++ b/testing/docker/desktop32-build/bin/checkout-sources.sh @@ -0,0 +1,54 @@ +#! /bin/bash -vex + +set -x -e + +# Inputs, with defaults + +# mozharness builds use three repositories: gecko (source), mozharness (build +# scripts) and tools (miscellaneous) for each, specify *_REPOSITORY. If the +# revision is not in the standard repo for the codebase, specify *_BASE_REPO as +# the canonical repo to clone and *_HEAD_REPO as the repo containing the +# desired revision. For Mercurial clones, only *_HEAD_REV is required; for Git +# clones, specify the branch name to fetch as *_HEAD_REF and the desired sha1 +# as *_HEAD_REV. For compatibility, we also accept MOZHARNESS_{REV,REF} + +: GECKO_REPOSITORY ${GECKO_REPOSITORY:=https://hg.mozilla.org/mozilla-central} +: GECKO_BASE_REPOSITORY ${GECKO_BASE_REPOSITORY:=${GECKO_REPOSITORY}} +: GECKO_HEAD_REPOSITORY ${GECKO_HEAD_REPOSITORY:=${GECKO_REPOSITORY}} +: GECKO_HEAD_REV ${GECKO_HEAD_REV:=default} +: GECKO_HEAD_REF ${GECKO_HEAD_REF:=${GECKO_HEAD_REV}} + +: MOZHARNESS_REPOSITORY ${MOZHARNESS_REPOSITORY:=https://hg.mozilla.org/build/mozharness} +: MOZHARNESS_BASE_REPOSITORY ${MOZHARNESS_BASE_REPOSITORY:=${MOZHARNESS_REPOSITORY}} +: MOZHARNESS_HEAD_REPOSITORY ${MOZHARNESS_HEAD_REPOSITORY:=${MOZHARNESS_REPOSITORY}} +: MOZHARNESS_REV ${MOZHARNESS_REV:=production} +: MOZHARNESS_REF ${MOZHARNESS_REF:=${MOZHARNESS_REV}} +: MOZHARNESS_HEAD_REV ${MOZHARNESS_HEAD_REV:=${MOZHARNESS_REV}} +: MOZHARNESS_HEAD_REF ${MOZHARNESS_HEAD_REF:=${MOZHARNESS_REF}} + +: TOOLS_REPOSITORY ${TOOLS_REPOSITORY:=https://hg.mozilla.org/build/tools} +: TOOLS_BASE_REPOSITORY ${TOOLS_BASE_REPOSITORY:=${TOOLS_REPOSITORY}} +: TOOLS_HEAD_REPOSITORY ${TOOLS_HEAD_REPOSITORY:=${TOOLS_REPOSITORY}} +: TOOLS_HEAD_REV ${TOOLS_HEAD_REV:=default} +: TOOLS_HEAD_REF ${TOOLS_HEAD_REF:=${TOOLS_HEAD_REV}} + +: MH_CUSTOM_BUILD_VARIANT_CFG ${MH_CUSTOM_BUILD_VARIANT_CFG} +: MH_BRANCH ${MH_BRANCH:=mozilla-central} +: MH_BUILD_POOL ${MH_BUILD_POOL:=staging} + +: WORKSPACE ${WORKSPACE:=/home/worker/workspace} + +set -v + +# check out mozharness +tc-vcs checkout mozharness $MOZHARNESS_BASE_REPOSITORY $MOZHARNESS_HEAD_REPOSITORY $MOZHARNESS_HEAD_REV $MOZHARNESS_HEAD_REF + +# check out tools where mozharness expects it to be ($PWD/build/tools and $WORKSPACE/build/tools) +tc-vcs checkout $WORKSPACE/build/tools $TOOLS_BASE_REPOSITORY $TOOLS_HEAD_REPOSITORY $TOOLS_HEAD_REV $TOOLS_HEAD_REF +if [ ! -d build ]; then + mkdir -p build + ln -s $WORKSPACE/build/tools build/tools +fi + +# and check out mozilla-central where mozharness will use it as a cache (/builds/hg-shared) +tc-vcs checkout $WORKSPACE/build/src $GECKO_BASE_REPOSITORY $GECKO_HEAD_REPOSITORY $GECKO_HEAD_REV $GECKO_HEAD_REF diff --git a/testing/docker/desktop32-build/buildprops.json b/testing/docker/desktop32-build/buildprops.json new file mode 100644 index 00000000000..f38b7d788e0 --- /dev/null +++ b/testing/docker/desktop32-build/buildprops.json @@ -0,0 +1,9 @@ +{ + "properties": { + "buildername": "" + }, + "sourcestamp": { + "changes": [] + }, + "comments": "TaskCluster Job" +} diff --git a/testing/docker/desktop32-build/hacks.sh b/testing/docker/desktop32-build/hacks.sh new file mode 100755 index 00000000000..62d6d5ce260 --- /dev/null +++ b/testing/docker/desktop32-build/hacks.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +## +# Install compiler hacks, necessary for builds to work properly, +# but ultimately to be removed in favor of something cleaner +## + +ln -s /usr/include/linux/a.out.h /usr/include/a.out.h diff --git a/testing/docker/desktop32-build/oauth.txt b/testing/docker/desktop32-build/oauth.txt new file mode 100644 index 00000000000..e56c71f577c --- /dev/null +++ b/testing/docker/desktop32-build/oauth.txt @@ -0,0 +1,2 @@ +taskcluster_clientId = None +taskcluster_accessToken = None