Commit Graph
393 Commits
Author SHA1 Message Date
Gregory Szorc b38d09583c Bug 1289249 - Use os.lchown; r=garndt
See the inline comment for reason.
2016-09-30 15:22:28 -07:00
Ted Mielczarek e4ae8a28ad bug 1306662 - Make desktop-test and desktop1604-test pull minidump_stackwalk binary from the in-tree tooltool manifest. r=gps
Instead of having the desktop[1604]-test images currently bake in a
minidump_stackwalk binary from some random S3 URL, use the binary listed
in the in-tree tooltool manifest that we use for buildbot test jobs. As
a nice side-effect, this will ensure that the desktop-test images get
rebuilt whenever that manifest is updated with a new version, so they
will continue to use the right version in the future.

MozReview-Commit-ID: 6bThddwq6p1
2016-09-30 13:17:20 -04:00
Gregory Szorc d4e19012a6 Backed out changeset 22eee779473b (bug 1306662) for image generation failures 2016-09-30 10:41:48 -07:00
Ted Mielczarek f58563f3ec bug 1306662 - Make desktop-test and desktop1604-test pull minidump_stackwalk binary from the in-tree tooltool manifest. r=gps
Instead of having the desktop[1604]-test images currently bake in a
minidump_stackwalk binary from some random S3 URL, use the binary listed
in the in-tree tooltool manifest that we use for buildbot test jobs. As
a nice side-effect, this will ensure that the desktop-test images get
rebuilt whenever that manifest is updated with a new version, so they
will continue to use the right version in the future.

MozReview-Commit-ID: 6bThddwq6p1
2016-09-30 13:17:20 -04:00
Gregory Szorc 908f47fcda Bug 1289249 - Add run-task to desktop-build image; r=dustin
run-task is our new universal wrapper for executing tasks. Add it
to desktop-build.

MozReview-Commit-ID: BCYHVRdUopQ
2016-09-28 20:12:08 -07:00
Gregory Szorc 3e4cdb79bf Bug 1289249 - Add volumes for Mercurial checkouts; r=dustin
In preparation for switching desktop-build to use run-task and
its VCS management.

MozReview-Commit-ID: 17WBMQhJxaV
2016-09-28 20:53:43 -07:00
Gregory Szorc e053d2426b Bug 1289249 - Install Mercurial 3.9.1 in desktop-build; r=dustin
As part of this, we had to teach install-mercurial.sh to detect
CentOS and install from RPM or source. While we can support
installing from an RPM on CentOS 6, this code is currently disabled
because the RPM we have is built against Python 2.6, which doesn't
support TLS 1.2. Since we have Python 2.7 on the image and this
Python 2.7 install supports TLS 1.2, we build Mercurial from source
using this Python 2.7 install.

We also added a "system setup" shell script. This matches the
conventions used for the desktop-test images.

MozReview-Commit-ID: 7cHN54n7aQF
2016-09-29 17:54:04 -07:00
Gregory Szorc 4dcbc2bf61 Bug 1289249 - Extract tooltool_fetch to its own shell script; r=dustin
I will add more stuff to common.sh in the future in order to justify
its existence. Not in this bug though.

MozReview-Commit-ID: Lx7MJwBMH0w
2016-09-28 21:45:25 -07:00
Gregory Szorc 976f76e54b Bug 1289249 - Use vendored tooltool in desktop-build image; r=dustin
Vendoring: more reliable, more determinism, more secure.

MozReview-Commit-ID: BYUUj4ZpndD
2016-09-28 21:54:21 -07:00
Gregory Szorc a9c69746a5 Bug 1289249 - Add argument to perform build/tools checkout; r=dustin
Build tasks currently require a checkout of the build/tools repository.
I wish this weren't true and that all files references from this repo
were part of mozilla-central or tooltool, but that's how things are.

In preparation for running build tasks with run-task, teach run-task
to perform a checkout of the build/tools repo. Ideally we'd support
configuring the URL to this repository. But I'm not implementing that
since I'd prefer we stop relying on the build/tools repo.

MozReview-Commit-ID: B2Y1NwS3niO
2016-09-29 18:49:07 -07:00
Gregory Szorc 19f6661560 Bug 1289249 - Make version control interaction generic; r=dustin
Previously, we assumed we only could have a single version control
checkout: Gecko/Firefox. The code reflected this by not passing
arguments to the vcs_checkout function.

Upcoming commits will introduce the need to perform a checkout of the
build/tools repository. In preparation for this, refactor the VCS
functionality so it is generic and can work on any repo.

MozReview-Commit-ID: B0Act9fz2Ee
2016-09-29 17:05:05 -07:00
Gregory Szorc 4cbfbc9f62 Bug 1289249 - Set permissions of parent directory during --chown-recursive; r=dustin
os.walk() won't explicitly yield the root directory. So we need to
update it explicitly when doing a recursive chown.

MozReview-Commit-ID: JC0PNsk5gFK
2016-09-29 10:07:21 -07:00
Gregory Szorc 1f80bd02c4 Bug 1305910 - Use vendored robustcheckout.py; r=dustin
When we initially implemented support for robustcheckout, we didn't
have the magic "%include" syntax in Dockerfiles. So we used tooltool
to download robustcheckout.py to the image.

Now that we have nice things, we can use the vendored robustcheckout.py
file.

As part of this, I realized we're inconsistently using /tmp, /setup
and /build for files used during image building. That should probably
be cleaned up. I'd rather not bloat scope for this bug, however.

MozReview-Commit-ID: D99Gcdw1DId
2016-09-27 20:05:54 -07:00
Gregory Szorc 0bbfa087af Bug 1304964 - Invoke hg with PYTHONUNBUFFERED=1; r=dustin
Python processes with a TTY have stdout line buffered by default.
Python processes without a TTY have buffered output.

Mercurial inherits whatever Python's output buffering behavior is.
This means if we invoke Mercurial without a TTY, stdout and stderr
will be fully buffered. This means output may not be sent until
there is enough output to flush the output buffer.

A consequence of this is that timings reported for `hg` commands
invoked by run-task are inaccurate. In addition, output order is
incorrect. This is because Mercurial's progress indicators print
to stderr and flush when written. This means stderr output is
getting seen by run-task but stdout remains buffered.

This commit forces Python/Mercurial to not buffer stderr and stdout
by setting the PYTHONUNBUFFERED=1 environment variable.

MozReview-Commit-ID: 7lMdrjRMBqz
2016-09-22 23:33:01 -07:00
Gregory Szorc 51b49256ea Bug 1304176 - Remove PIP_TRUSTED_HOST and trust-host pip.conf option; r=ted
The Python code is now intelligent enough to add this flag on the
command line if supported. Eliminate the copy pasta and help prevent
cargo culting.

MozReview-Commit-ID: H4rbjbbgtRd
2016-09-20 14:02:08 -07:00
Grigory Kruglov 6ba1730796 Bug 1300094 - Update Gradle to 2.14.1 and Gradle Plugin to 2.1.3 r=sebastian
MozReview-Commit-ID: KDimL7VeEA2
2016-09-22 14:31:01 -07:00
Gregory Szorc 85fb7dfeb9 Bug 1303860 - Don't change directory when installing Mercurial; r=dustin
install-mercurial.sh was switching directories to /usr/local/mercurial
resulting in following actions adding files to that path. We don't
want that. So avoid the `cd` in install-mercurial.sh.

The main side effect of this change is that the desktop-test image is
now ~1.2 GB smaller because files aren't being saved to
/usr/local/mercurial.

MozReview-Commit-ID: Kyv8oXtvsda
2016-09-19 14:15:06 -07:00
Gregory Szorc c0da03e5db Bug 1302907 - Merge test-ubuntu1204.sh and test-ubuntu1604.sh; r=dustin
The only difference in these files was the order that pulseaudio is
started and whether compiz is started. We rename test-ubuntu1604.sh
to test-ubuntu.sh, add some distro release detection, and add
some conditional branches so it works on both Ubuntu 12.04 and 16.04.

MozReview-Commit-ID: CaSfuDxss3d
2016-09-20 17:17:18 -07:00
Gregory Szorc 7f6dd3af6c Bug 1272629 - Add bison package to desktop-build image; r=glandium
We can't add it to the base image because rebuilding the base image
breaks Valgrind due to non-deterministic package version installation
(read the bug for the ugly backstory).

MozReview-Commit-ID: ARKJZfNCRFc
2016-09-14 18:49:53 -07:00
Wes Kocher 240967746d Backed out changeset f227ea4d52fe (bug 1302907) because it caused some updated packages to get built, causing linux64 failures a=backout CLOSED TREE 2016-09-15 14:40:10 -07:00
Gregory Szorc 28f966d3fe Bug 1302907 - Merge test-ubuntu1204.sh and test-ubuntu1604.sh; r=dustin
The only difference in these files was the order that pulseaudio is
started and whether compiz is started. We rename test-ubuntu1604.sh
to test-ubuntu.sh, add some distro release detection, and add
some conditional branches so it works on both Ubuntu 12.04 and 16.04.

MozReview-Commit-ID: CaSfuDxss3d
2016-09-14 16:29:25 -07:00
Gregory Szorc a422f97927 Bug 1302821 - Ensure owner has full privileges on directories; r=dustin
Previously, when recursively changing ownership on directories we would
only change the owner. We saw some permission denied failures in
automation where the new owner couldn't modify files or directories.
This *might* be due to the owner write bits not always being set. Or
it could be something else (such as a filesystem bug - *cough* AUFS
*cough*).

This commit changes our recursive chown implementation to ensure owner
read, write, and execute bits are set on directories.

Because we're now always calling stat(), the code for calling chown()
is made conditional because we have the stat information and can avoid
the extra system call if it would be a no-op.

MozReview-Commit-ID: JT9q3QR4Sit
2016-09-14 12:26:15 -07:00
Gregory Szorc fd692e7b39 Bug 1296397 - Add source checkout to web platform test tasks; r=dustin
This commit does a few things. First, it introduces a property on the
"test_description" schema that, if defined, will cause run-task to
perform a gecko checkout. The presence of the property also configures
the needed scopes and caches.

Second, we introduce the property on web platform test tasks so a
Gecko checkout is present. We also add volumes for the Mercurial
paths to the Docker images. We strictly only need this for
desktop1604-test since WPT tests don't run on desktop-test. However,
desktop-test and desktop1604-test are nearly mirror images of each
other and I feel it is best to keep them in sync.

This commit will make WPT tasks slower on average because they will
need to create a checkout. To add salt to the wound, the checkout
isn't used. However, we need to prove that performing checkouts in
test tasks in automation works at scale. I'd prefer to have this running
for a few weeks and incurring a wall time execution penalty than to
have a giant series of commits backed out because source checkouts
aren't working.

MozReview-Commit-ID: 9UrSWSSmr3w
2016-09-14 08:20:10 -07:00
Gregory Szorc 5c7f3add71 Bug 1295380 - Use run-task for test tasks; r=dustin
Before, test.sh (duplicated between the desktop-test and
desktop1604-test images) was dropping permissions, creating a workspace,
and executing test-linux.sh. This is functionality now provided by
run-task.

So, convert the test tasks to use run-task.

It's worth noting that creating the workspace directory is no longer
necessary because it is defined as a VOLUME in the Dockerfile or a
cache in some task configurations. However, it is default owned by
root:root, so we do need to instruct run-task to chown it.

Since the test.sh files are no longer used after this change, they have
been deleted. The desktop-test image no longer has any files in the
bin/ directory, so the Dockerfile entry to copy those files has been
removed.

MozReview-Commit-ID: 1BiskrMs6xW
2016-08-16 09:25:35 -07:00
Gregory Szorc 3207c9d5a3 Bug 1295380 - Teach run-task to chown paths; r=dustin
It is common for tasks to chown paths before permissions are dropped
from root:root. This commonly occurs when Docker volumes/caches are
involved since they are default owned by root:root and not writable
by any other user.

Since this will likely be a common request, add the functionality to
run-task.

MozReview-Commit-ID: AHmSfY5Ce0S
2016-08-16 19:31:12 -07:00
Carsten "Tomcat" Book de28521dda merge autoland to mozilla-central a=merge 2016-09-08 11:59:31 +02:00
Carsten "Tomcat" Book 98b136a01c Backed out changeset d392d81c5b9e (bug 1297585) for breaking artifact desktop builds 2016-09-08 11:57:29 +02:00
Al Tsai 5e8ee2186b Bug 1297585 - Modify parameters for buildUrl to satisfy taskcluster changes. r=glandium 2016-09-01 15:02:09 +08:00
Gregory Szorc 74ca91c74b Bug 1298947 - Pin hg.mozilla.org fingerprint; r=dustin
We just upgraded our run-time environment to Mercurial 3.9.
3.9 features a new [hostsecurity] config section and allows certificate
fingerprints to be defined using SHA-256 hashes (not just SHA-1).

A TaskCluster secret with the Mercurial 3.9 fingerprint format has
been added. This commit takes advantage of it.

MozReview-Commit-ID: 5NwJl9zOse2
2016-09-01 15:38:30 -07:00
Gregory Szorc c4b37c9ac4 Backed out changeset d31f5e1edb53 (bug 1298947) for taskcluster failures 2016-09-07 10:36:04 -07:00
Gregory Szorc 09fea3fd41 Bug 1298947 - Pin hg.mozilla.org fingerprint; r=dustin
We just upgraded our run-time environment to Mercurial 3.9.
3.9 features a new [hostsecurity] config section and allows certificate
fingerprints to be defined using SHA-256 hashes (not just SHA-1).

A TaskCluster secret with the Mercurial 3.9 fingerprint format has
been added. This commit takes advantage of it.

MozReview-Commit-ID: 5NwJl9zOse2
2016-09-01 15:38:30 -07:00
Gregory Szorc a0f785d05f Backed out changeset ba338ab6c809 for TC bustage (bug 1298947) 2016-09-02 12:05:00 -07:00
Gregory Szorc a0f34b05a8 Bug 1298947 - Tag and use decision image 0.1.6; r=dustin
Containing the Mercurial 3.9.1 version bump and the change to pin the
hg.mo fingerprint from a TC secret.

MozReview-Commit-ID: LVU7P0LqIvD
2016-09-01 15:21:02 -07:00
Gregory Szorc 8adc95bd14 Bug 1298947 - Pin hg.mozilla.org fingerprint; r=dustin
We just upgraded our run-time environment to Mercurial 3.9.
3.9 features a new [hostsecurity] config section and allows certificate
fingerprints to be defined using SHA-256 hashes (not just SHA-1).

A TaskCluster secret with the Mercurial 3.9 fingerprint format has
been added. This commit takes advantage of it.

MozReview-Commit-ID: 5NwJl9zOse2
2016-09-01 15:38:30 -07:00
Gregory Szorc dcf2b58dce Bug 1298947 - Remove curl and jq from decision image; r=dustin
curl and jq were previously used to fetch and parse the TC secret.
We now use Python for that. So remove the unused packages.

This reduces the Docker image size by ~10MB.

MozReview-Commit-ID: Nl7fC1aG7w
2016-09-01 15:41:26 -07:00
Gregory Szorc 2c3e90af6a Bug 1298944 - Upgrade from Mercurial 3.8.4 to 3.9.1; r=dustin
Mercurial 3.9 changes the default security settings to make Mercurial
secure by default. It is important for Firefox's automation to be
secure.

MozReview-Commit-ID: IF7Z74111hI
2016-09-01 15:16:16 -07:00
Nick Alexander 63419297ab Bug 1299869 - Track desktop-build xfvb changes. r=garndt
When I wrote this initially, I was told it was not possible to inherit
from desktop-build.  That may have changed, but I still don't know how
to inherit, so we duplicate the logic here, inviting bugs of this
class.  The underlying logic moves slowly so this is an acceptable
approach.

MozReview-Commit-ID: AsWdbp0QK5K
2016-09-01 10:30:18 -07:00
Gregory Szorc 0fe16159c3 Bug 1298455 - Tag and use decision image 0.1.5; r=dustin
MozReview-Commit-ID: Fmc4l70onV2
2016-08-26 11:10:30 -07:00
Gregory Arndt 9f3efa245e Bug 1263815 - retry xvfb startup. r=dustin
Sometimes xvfb will not start up with the current retry/delay settings. This will
attempt to retry more and delay for longer to ensure xvfb has started up. Common
pieces of this have been factored out into a recipe that all docker images can schare
that need this functionality.

MozReview-Commit-ID: BTXkJkBWLZX
2016-07-06 09:06:58 -05:00
Sebastian Kaspari 8ce9af9e5f Bug 1296335 - after.sh: Package gradle binaries as gradle-dist.tar.xz. r=Callek
MozReview-Commit-ID: HkKCc8V5pgf
2016-08-19 15:06:44 +02:00
Gregory Szorc 4009c26257 Backed out changeset e6e5569551be (bug 1263815) for valgrind failures because Docker image generation isn't deterministic 2016-08-18 15:50:28 -07:00
Wes Kocher 9edaa2d9c0 Backed out 2 changesets (bug 1295380) because it needs treeherder changes deployed before it can land a=backouty
Backed out changeset 905fb4a53386 (bug 1295380)
Backed out changeset 213a4986ccfd (bug 1295380)
2016-08-18 15:03:55 -07:00
Gregory Szorc 591edb9f7c Bug 1295380 - Use run-task for test tasks; r=dustin
Before, test.sh (duplicated between the desktop-test and
desktop1604-test images) was dropping permissions, creating a workspace,
and executing test-linux.sh. This is functionality now provided by
run-task.

So, convert the test tasks to use run-task.

It's worth noting that creating the workspace directory is no longer
necessary because it is defined as a VOLUME in the Dockerfile or a
cache in some task configurations. However, it is default owned by
root:root, so we do need to instruct run-task to chown it.

Since the test.sh files are no longer used after this change, they have
been deleted. The desktop-test image no longer has any files in the
bin/ directory, so the Dockerfile entry to copy those files has been
removed.

MozReview-Commit-ID: 1BiskrMs6xW
2016-08-16 09:25:35 -07:00
Gregory Szorc ea52240121 Bug 1295380 - Teach run-task to chown paths; r=dustin
It is common for tasks to chown paths before permissions are dropped
from root:root. This commonly occurs when Docker volumes/caches are
involved since they are default owned by root:root and not writable
by any other user.

Since this will likely be a common request, add the functionality to
run-task.

MozReview-Commit-ID: AHmSfY5Ce0S
2016-08-16 19:31:12 -07:00
Gregory Arndt 82e199c84e Bug 1263815 - retry xvfb startup. r=dustin
Sometimes xvfb will not start up with the current retry/delay settings.  This will
attempt to retry more and delay for longer to ensure xvfb has started up.  Common
pieces of this have been factored out into a recipe that all docker images can schare
that need this functionality.

MozReview-Commit-ID: 2ww0eT3cIt6
2016-07-06 09:06:58 -05:00
Alexandre Lissy a70e501337 Bug 1295900 - Switch git-repo off git.mozilla.org r=garndt
MozReview-Commit-ID: Lu6oo0XDTYU
2016-08-17 10:16:54 +02:00
Gregory Szorc b48f059dc3 Backed out changeset 25bc6ca8f19f (bug 1294234) for breaking TC tests
Introduced a (possibly intermittent) permissions failure downloading
mozharness. Might be cache related.
2016-08-12 21:23:41 -07:00
Gregory Szorc aac05b8afa Bug 1294234 - Use run-task for test tasks; r=dustin
Before, test.sh (duplicated between the desktop-test and
desktop1604-test images) was dropping permissions, creating a workspace,
and executing test-linux.sh. This is functionality now provided by
run-task.

So, convert the test tasks to use run-task.

One thing run-task isn't doing is created the workspace. So this
functionality has been moved into test-ubuntu1204.sh and
test-ubuntu1604.sh.

Since the test.sh files are no longer used after this change, they have
been deleted. The desktop-test image no longer has any files in the
bin/ directory, so the Dockerfile entry to copy those files has been
removed.

MozReview-Commit-ID: 1BiskrMs6xW
2016-08-09 14:34:58 -07:00
Gregory Szorc 0f2bc882ab Bug 1294234 - Add test-ubuntu*.sh scripts to Docker image; r=dustin
Before, we `curl`d these files at task run time. Why, I'm not sure.
Probably the easiest way to do things before we could add files outside
the directory of the Dockerfile to the image build context. Since that
is no longer a restriction, we just include the file as part of the
built image.

This does mean we rebuild the Docker image if the scripts change. I'm
fine with that.

It's worth noting that both test.sh files look very similar. I
anticipate consolidation in the future...

MozReview-Commit-ID: 48dinmxy6G0
2016-08-09 13:12:14 -07:00
Gregory Szorc 392be39957 Bug 1294234 - Use more byte literals; r=ekyle
Without this, we potentially mix unicode literals and str and have
implicit type coercion, leading to UnicodeDecodeError or some such.
Oh, the joys of Python.

MozReview-Commit-ID: IeXRjs5Fnj7
2016-08-10 16:01:25 -07:00