Commit Graph

381 Commits

Author SHA1 Message Date
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
Wes Kocher
a29d6e16d7 Backed out 3 changesets (bug 1294234) for UnicodeDecodeError failures in various tests a=backout CLOSED TREE
Backed out changeset d118ab526ad8 (bug 1294234)
Backed out changeset 3cfc4041d48d (bug 1294234)
Backed out changeset 710d37b610a8 (bug 1294234)
2016-08-11 16:04:48 -07:00
Gregory Szorc
800ed3b483 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
22a3adc76e 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
6811dc3e59 Bug 1293822 - Have worker own /home/worker files; r=dustin
This effectively reverts the change in 2f0d6ea822b5 (bug 1163057)
to own the files by root:root. Since that change landed, we su
to the "worker" user early during task startup. So there is no more
need to have /home/worker owned by root:root.

MozReview-Commit-ID: 77q9APiDKpb
2016-08-09 16:15:22 -07:00
Gregory Szorc
909a350a9b Bug 1293737 - Add some common settings to global hgrc; r=dustin
The install-mercurial.sh script takes care of installing a global hgrc.
If we want Mercurial settings, that's where they should be defined.

A number of Docker images had redundantly maintained versions of
/home/worker/.hgrc. We've deleted some instances of these hgrc files
because I thought they were cargo culted. It turns out that the config
was added to support one-click loaners (see bug 1250904).

Since there is little harm in enabling extensions globally, we just do
that in the shared install-mercurial.sh script and do away with the
custom hgrc.

It's worth noting that the CA path defined in the custom hgrc is not
needed because the Mercurial package installed by install-mercurial.sh
configures this correctly.

MozReview-Commit-ID: bk4ek99X4z
2016-08-09 11:40:57 -07:00
Gregory Szorc
13ce35ac89 Bug 1293737 - Merge ubuntu1204-test and ubuntu1204-test-upd into desktop-test; r=dustin
We're giving the same treatment to the Ubuntu 12.04 test image that we
did to the Ubuntu 16.04 image in bug 1293686.

As of this commit, the image can be fully regenerated from changes in
tree: no Docker Hub pushes necessary.

A downside is would could get bit by lack of determinism in image
building. But that's already a problem.

Since the ubuntu1204-test and ubuntu1204-test-upd images are no longer
used, they have been deleted.

MozReview-Commit-ID: 55DwqHOmVM5
2016-08-09 11:36:57 -07:00
Gregory Szorc
dd970cb04f Bug 1293737 - Move ubuntu1204-test's system-setup.sh to recipes; r=dustin
In preparation for deleting this image.

MozReview-Commit-ID: Iu9vifGgGE0
2016-08-09 11:32:22 -07:00
Anthony Miyaguchi
0c8e0a1787 bug 1292393 - Support symbolic revisions in decision task r=gps
The decision task now uses robustcheckout to get the latest mercurial state.
However, robustcheckout also enforces that the revision it's passed is
actually a revision hash, and not a symbolic name. This will use the --branch
option of robustcheckout if GECKO_HEAD_REF is defined and will use `hg log` to
fill in GECKO_HEAD_REF.

MozReview-Commit-ID: LJikceW4YVg
2016-08-09 13:14:05 -07:00
Gregory Szorc
1e6f621fff Bug 1293686 - Merge ubuntu1604-test into desktop1604-test; r=dustin
The code from the base ubuntu1604-test image has been moved to
the desktop1604-test image. Since ubuntu1604-test is no longer
referenced, we remove it.

With this change, the desktop1604-test Docker image no longer
requires a push to the Docker Hub when updating: it is updated fully
within TaskCluster.

This will result in more image transfers in automation and to
developer machines. But we do gain a lot of convenience updating
the images.

MozReview-Commit-ID: GRpPOfs6pn3
2016-08-09 09:38:12 -07:00
Gregory Szorc
86f43d793b Bug 1293686 - Move ubuntu1604-test's system-setup.sh to recipes; r=dustin
In preparation for removing the ubuntu1604-test base image. We also
change the script's location in the image to /setup because that's the
path we use in most images.

MozReview-Commit-ID: CvjTO8hmIkW
2016-08-09 09:34:03 -07:00
Gregory Szorc
aff737901a Bug 1292696 - Remove version checks for libxcb and libgl; r=ahal
Pinning these packages breaks Ubuntu package management because
other packages we install explicitly require a newer version.
Attempting to pin these results in packages getting removed or refusal
to install.

MozReview-Commit-ID: AhQbjavCKI1
2016-08-08 14:42:06 -07:00
Gregory Szorc
fb9228d0ea Bug 1293395 - Declare Docker volumes for cache paths; r=dustin
As bug 1291940 shows, aufs can be a real performance drag.

Most performance critical paths in containers are caches. This allows
the use of the host filesystem (instead of aufs), which is much faster
under load.

Unfortunately, most caches are stripped on Try. This means paths that
would be served from the fast host filesystem are now being handled
by aufs. This can make Try jobs slower than non-Try jobs.

This commit declares Docker volumes for popular cache paths. If the
cache is present, the cache takes precedence over the declared volume.
If the cache isn't present, Docker falls back to an empty volume that's
used for the task and only the task.

It's worth noting that desktop-build is updated redundantly with
centos6-build. We currently can't rebuild centos6-build because of
a determinism issue (bug 1272629) breaking valgrind. So, I work around
this by declaring the volume in the top-most "desktop-build" layer.
This hack can be removed once we merge the images.

MozReview-Commit-ID: 7JtxAfI7ED5
2016-08-08 13:38:06 -07:00