Commit Graph
302 Commits
Author SHA1 Message Date
Carsten "Tomcat" Book dc848cfb84 merge mozilla-inbound to mozilla-central a=merge 2016-07-26 11:55:54 +02:00
Gregory Szorc ad6cb63b7f Bug 1247168 - Convert lint image and tasks to use robustcheckout; r=dustin
The robustcheckout Mercurial extension does a clone+checkout optimally.
Read the bug for more on it.

robustcheckout is already used by mozharness automation. It has resulted
in a significant reduction in I/O usage and utilization in automation.

This commit replaces tc-vcs with the robustcheckout equivalent.

We replace the existing tc-vcs scope and cache with a new one.
Because Dustin and I are paranoid, we maintain separate caches per
SCM level - even though we could arguably share the same cache. Defense
in depth.

Robustcheckout (when used with --sharebase) pools storage for related
repos automatically. i.e. changesets from inbound and central will
be in the same store. This means you likely only have one copy of
each changeset per cache. This can result in significant space savings.
And, since there are fewer copies floating around, hg.mozilla.org
and various network appliances are working less too!

Since tc-vcs is no longer used, we stop it from being installed.

While we're here, we also change the images to execute as the
"worker" user. This happens automatically as a result of using
the "checkout-and-run" script.

MozReview-Commit-ID: EDeebuP7TkT
2016-07-19 13:30:03 -07:00
Gregory Szorc c7147e5da2 Bug 1247168 - Add a script to perform a checkout then run a command; r=dustin
The script will be used as the main command in task YAML files.
It changes ownership of caches. Then switches to the "worker" user.
Then performs a Gecko checkout. Then executes whatever command was
requested via its arguments.

The script has been added to the shared recipes directory so it can
eventually be used by other Docker images. This means if we e.g. want
to add Git support, we only need to update one file in the tree.

MozReview-Commit-ID: Fuy1VrdSGYn
2016-07-21 14:57:37 -07:00
Gregory Szorc 14491133ed Bug 1247168 - Install Mercurial 3.8.4 in lint image; r=dustin
Like we do for the decision image, we install Mercurial 3.8.4 from deb
files hosted on tooltool. This provides more control and determinism
than installing via apt.

As part of this change, Mercurial is upgraded from whatever was hosted
in apt to 3.8.4.

Since the deb packages don't provide a global hgrc, we create one
ourselves. This is effectively copied from the decision image.

Most of the work is being done in a new, standalone
install-mercurial.sh script. This script is part of the
newly-established testing/docker/recipes directory. The intent of this
directory is to hold common files referenced by multiple images. Our
custom Dockerfile syntax to include files from outside the directory
with the Dockerfile is used to add these files to the build context.

MozReview-Commit-ID: K7gVm2Geihj
2016-07-19 14:43:25 -07:00
Gregory Szorc da1c2b2f45 Bug 1247168 - Use vendored tooltool in lint image; r=dustin
Using our special Dockerfile syntax to include arbitrary files, we
include the previously vendored tooltool.py file in the image build
context and add it directly from there. No github.com communication
needed.

MozReview-Commit-ID: J42iXj87LEu
2016-07-22 13:04:56 -07:00
Gregory Szorc 9b2b54dc35 Bug 1247168 - Reformat requirements.txt; r=dustin
Visual aligning makes diffs harder to read. Use line continuations
to avoid this. Also make the package list alphabetical.

MozReview-Commit-ID: KqT4aqYyZfH
2016-07-19 13:54:20 -07:00
Gregory Szorc a7e76c58cd Bug 1247168 - Tag and use version 0.1.2 of the decision image; r=dustin
Changes to the decision Docker image have been compelted. We're ready to
use the new image.

We tag the image, update version references, change the task caches
so the new Mercurial pooled storage from the robustcheckout extension is
used, and convert the decision tasks to run as the "worker" user.

MozReview-Commit-ID: 61v9Ivy59zG
2016-07-21 11:32:07 -07:00
Gregory Szorc 07325a3d5b Bug 1247168 - Introduce scripts for running action and decision tasks; r=dustin
When we switch to use robustcheckout for version control foo, we'll
also be taking the opportunity to have the decision and action tasks
execute as the "worker" user.

Since caches are mounted and owned by root and since tasks initially
run as root, this makes defining the container command in YAML a bit
difficult because we have to do some work as root then switch users
and continue executing. Rather than shoehorning all that complicated
logic into YAML, we introduce bash scripts that do it. These will
be plugged into the task YAML when we formally switch the tasks
to use the new Docker image.

We provide one script for running Gecko decision tasks. We provide
another for running action tasks. These are the two consumers of
the decision image we care about.

We also sneak in a change to add the executable bit to checkout-gecko.

MozReview-Commit-ID: CXlyHZJSHcP
2016-07-21 11:44:55 -07:00
Gregory Szorc e6173f49eb Bug 1247168 - Use robustcheckout in decision image; r=dustin
Now that Mercurial 3.8.4 and robustcheckout are in place, we convert
checkout-gecko from tc-vcs to robustcheckout.

As part of this, we remove references to tc-vcs from the Docker image.

This completes our changes to the decision Docker image. Image size has
been reduced from ~725 MB to ~217 MB. Not bad.

MozReview-Commit-ID: Hx9d02Al1TP
2016-07-20 12:10:52 -07:00
Gregory Szorc d1adb8c0ed Bug 1247168 - Configure Mercurial and install global hgrc; r=dustin
web.cacerts matches what the Ubuntu package does by default.

[progress] changes are to make output in TaskCluster logs less
spammy (only 1 update per second instead of up to 10).

The robustcheckout extension will be used in a subsequent commit to
handle repository checkouts.

MozReview-Commit-ID: 2PvW4wEGk2u
2016-07-20 10:22:26 -07:00
Gregory Szorc fc1ef49eeb Bug 1247168 - Vendor tooltool.py; r=dustin
Previously, we were downloading tooltool.py from github.com. There
were a few problems with this.

First, there is a dependency on a 3rd party service. While the Docker
image should be cached, as a matter of principle we don't like hitting
3rd party services in our automation. The file is small enough, so we
just vendor it.

Second - and more importantly - we weren't validating the integrity of
the downloaded file. This means that a MiTM could possibly alter the
content of the file without us knowing (they would need a valid CA but
since the Ubuntu trusted CA bundle contains a lot of CAs from e.g.
governments, this isn't out of the question). Vendoring the file removes
this risk.

Third, behavior wasn't deterministic over time. We were always
downloading the "master" revision of the file. I like determinism over
time. Vendoring makes things deterministic.

MozReview-Commit-ID: 4DdSd42BnAu
2016-07-20 10:03:17 -07:00
Gregory Szorc c355e97435 Bug 1247168 - Stop installing most system packages; r=dustin
I'm not sure why the decision image has so many packages installed.
Most of them don't need to exist because the decision image only
needs to obtain a copy of the Firefox repo and run `mach`. This
doesn't require any build system per se. And all the Python
dependencies are vendored in the Firefox repo. All we need is a
Python 2.7 interpreter.

This change reduces the decision image size from ~700 MB to ~300 MB.

MozReview-Commit-ID: CUqc5TUVZSc
2016-07-20 11:59:22 -07:00
Gregory Szorc 1cf3e548e8 Bug 1247168 - Install Mercurial 3.8.4 from .deb files; r=dustin
We change the installation of Mercurial from via peep to .deb files in
tooltool. The .deb files were produced by Mercurial's built-in make
targets to produce .deb packages.

As part of this, we upgrade to Mercurial 3.8.4. It should be a drop-in
replacement.

Since we no longer use peep, we stop installing it and pip/setuptools
since they were only needed to run peep.

It's worth noting that we choose to install from .deb files instead of
pip because this keeps image creation small and simple. Otherwise we'd
have to install a compiler, etc.

MozReview-Commit-ID: INnKDHkX2uk
2016-07-20 09:43:01 -07:00
Gregory Szorc df41dc9baf Bug 1247168 - Don't install virtualenv in the decision image; r=dustin
AFAICT this isn't needed.

MozReview-Commit-ID: 9eG7a4yHFPw
2016-07-20 09:31:48 -07:00
Gregory Szorc fa9aa79fd7 Bug 1247168 - Change decision image to Ubuntu 16.04; r=dustin
We're currently running Ubuntu 14.04 in the decision image. While it is
still in LTS support, 16.04 ships with a modern, properly configured Python
2.7. So we upgrade to 16.04 and drop the install of Python from source
because it is no longer needed.

This is part 1 of a larger refactor to this image.

MozReview-Commit-ID: CTbsPmTjcgs
2016-07-20 09:21:38 -07:00
Gregory Szorc 3c636aee9c Bug 1247168 - Create worker user/group in decision image; r=dustin
In preparation for running tasks as the worker user.

MozReview-Commit-ID: DLgD0lh5V2C
2016-07-21 10:06:38 -07:00
Joel Maher 6f4c14a6e3 Bug 1281179 - Create a docker image for Ubuntu 16.04 for use in tests. r=dustin
MozReview-Commit-ID: ApHhev5J21x
2016-07-25 10:44:37 -04:00
Masatoshi Kimura 108e90caa4 Bug 1280178 - Update desktop-test images to node 5.0.0. r=dustin
MozReview-Commit-ID: EjCzi8eVZM8
2016-06-28 20:50:28 +09:00
Phil Ringnalda 33bf8262a2 Backed out changeset 2a9ec8b312c3 (bug 1280178) for taskcluster-images failure 2016-07-09 08:46:02 -07:00
Masatoshi Kimura 0e7dcc44c0 Bug 1280178 - Update desktop-test images to node 5.0.0. r=dustin
MozReview-Commit-ID: EjCzi8eVZM8
2016-06-28 20:50:28 +09:00
Kalpesh Krishna 7baed7fa64 Bug 1284005 - Replacing timestamps with relative timestamps. r=dustin 2016-07-06 03:03:00 +02:00
Ryan VanderMeulen fbc5bb978a Backed out changeset 320ee1117179 (bug 1284005) for gecko-decision task failures. 2016-07-07 00:16:45 -04:00
Kalpesh Krishna e445873925 Bug 1284005 - Replace timestamps with relative timestamps. r=dustin 2016-07-06 03:03:00 -04:00
Carsten "Tomcat" Book 755e48f06f Backed out changeset 8c9ee38712de (bug 1284005) for gecko-decision task failures 2016-07-07 05:56:00 +02:00
Kalpesh Krishna 991c8ee838 Bug 1284005 - Replacing timestamps with relative timestamps. 2016-07-06 03:03:00 +02:00
Alexandre Lissy 6d67995fe4 Bug 1284447 - Cleanup Gecko and mozharness configs r=jlund,wcosta
MozReview-Commit-ID: 6R7vet77cyk
2016-07-05 13:10:08 +02:00
Alexandre Lissy 2c8e62b898 Bug 1282226 - Kill secrets from phone-builder image and fix aries/hammerhead r=wcosta
MozReview-Commit-ID: LOZHgih2TrM
2016-06-28 19:46:40 +02:00
Andrew Halberstadt 873796f518 Bug 1279040 - Move 'run-wizard' binary out of docker image, r=dustin
The run-wizard binary (used by interactive workers) will likely need to
change relatively frequently. Therefore, it should be baked directly into
the docker image. This patch instead downloads it from the appropriate
commit on hg.mozilla.org, only when needed.

MozReview-Commit-ID: 70hlloywCSj
2016-06-23 10:00:54 -04:00
Dustin J. Mitchell d0dc94a80c Bug 1275409: move legacy taskcluster-related scripts to taskcluster/scripts; r=wcosta
MozReview-Commit-ID: 7ilVJkNAPvE
2016-06-04 22:57:41 +00:00
Andrew Halberstadt 8ddf9dafdf Bug 1250904 - Start a wizard upon initiating an interactive shell, r=armenzg
To make things as easy as possible, run a little wizard to help developers
choose what to do. This way they don't need to memorize any commands or read
any wiki pages.

MozReview-Commit-ID: DzBlVUs9R8I
2016-05-25 11:12:45 -04:00
Andrew Halberstadt 0a67bad31e Bug 1250904 - Add an hgrc for 'worker' user in testing/docker/desktop-test, r=armenzg
This creates some defaults, enables common built-in extensions and sets up
Ubuntu's CA file for checking host certificates.

MozReview-Commit-ID: DzBlVUs9R8I
2016-05-27 10:25:14 -04:00
Andrew Halberstadt 2e38349ff6 Bug 1250904 - Re-organize dot-files in testing/docker/desktop-test, r=armenzg
We'll need to add a number of dot-files and binaries to /home/worker/bin as
part of the effort to make debugging on remote machines easier, move them all
to a 'dot-files' subfolder and +x everything in /home/worker/bin.

MozReview-Commit-ID: DzBlVUs9R8I
2016-05-27 10:24:23 -04:00
Andrew Halberstadt 5357e68fb4 Bug 1273634 - Add flake8 dependencies to the lint image, r=dustin
This adds flake8 dependencies. Note that ubuntu 16.04 repos include pip > 8.0
which has peep merged into it, so there's no need to install peep separately.

I also ran into a locale issue which was causing a UnicodeDecodeError anytime
python tried to print a unicode character. The "locale-gen/dpkg-reconfigure locales"
fix the problem.

MozReview-Commit-ID: DQhYV6Emklw
2016-05-28 21:47:33 -04:00
Carsten "Tomcat" Book a864c7d356 Backed out changeset 0c3f4cbf0bfe (bug 1273634) in order to reopen closed trees due to bug 1277530 2016-06-02 15:07:15 +02:00
Andrew Halberstadt 63c8921502 Bug 1273634 - Add flake8 dependencies to the lint image, r=dustin
This adds flake8 dependencies. Note that ubuntu 16.04 repos include pip > 8.0
which has peep merged into it, so there's no need to install peep separately.

I also ran into a locale issue which was causing a UnicodeDecodeError anytime
python tried to print a unicode character. The "locale-gen/dpkg-reconfigure locales"
fix the problem.

MozReview-Commit-ID: DQhYV6Emklw
2016-05-28 21:47:33 -04:00
Carsten "Tomcat" Book 322c10e0a1 Backed out changeset 66c7af8b2654 (bug 1272629) for failing valgrind tests 2016-07-22 08:35:19 +02:00
Enes Goktas 712c95ba6c Bug 1272629 - Add bison package installation to taskcluster docker setup script. r=dustin
Update centos6 build version from 0.1.6 to 0.1.7

MozReview-Commit-ID: 66Eu8lCfOHy
2016-07-22 11:00:42 +09:00
Andrew Halberstadt 768f223504 Bug 1276409 - Use a generic ubuntu image as a base for the lint image, r=dustin
The ES job uses an image based on the official node image. While this was convenient
for eslint, it is a bit less convenient for other things. I want to use this image
for all lint jobs, and switching the base to a generic ubuntu image seems a bit cleaner.

I chose 16.04 for no good reason other than it is the most recent, and we might as well.
Node v4.4.5 and taskcluster-vcs have been uploaded to tooltool.

MozReview-Commit-ID: GngYeH98zO1
2016-05-25 09:32:10 -04:00
Wander Lairson Costa 0a8bc37330 Bug 1274765: Upgrade mercurial on docker images. r=garndt
Instead of using mockbuilds-repo to install mercurial, we do so through
pip.
2016-05-23 10:45:00 +02:00
Gregory Arndt 59953964ac Bug 1275276 - Fail if image context cannot be downloaded r=jhford
MozReview-Commit-ID: DGOfH3MF2Sb
2016-05-24 08:57:18 -05:00
Carsten "Tomcat" Book f271666494 Backed out changeset a9b9a9115d01 (bug 1274765) for failing taskcluster-images opt 2016-05-24 17:02:23 +02:00
Wander Lairson Costa 65c7a333f5 Bug 1274765: Upgrade mercurial on docker images. r=garndt
Instead of using mockbuilds-repo to install mercurial, we do so through
pip.
2016-05-23 10:45:00 +02:00
Michael Ratcliffe 0dbf9a00e1 Bug 1265082 - ESLint jobs are apparently hitting the network r=me,dustin,pbro,jryans
So a few changes here:
- node_modules is downloaded using tooltool so that we dont need to rely on external infrastructure.
- We have a npm-shrinkwrap.json file that version locks all of our node packages.
- eslint, eslint-plugin-mozilla etc. are now all installed locally.

In reality this means that we don't hit the network and we don't force users into installing global packages.

./mach eslint --setup has also been improved. We install packages locally and display the path of the user's eslint binary (useful for configuring editors).

eslint-plugin-mozilla has been moved from testing/eslint-plugin-mozilla to /testing/eslint/eslint-plugin-mozilla.

The node_modules directory for eslint and other plugins is located in testing/eslint/.

MozReview-Commit-ID: 4SFSxzka6BS
2016-05-02 00:22:31 +01:00
Gregory Arndt 177d177a0b Bug 1268925 - Check hg fingerprint when cloning in a decision task r=dustin
When cloning from mercurial the host fingerprint should be validated to the
currently known good fingerprint.  This needs to be stored in a commit
independent way so that rerunning tasks in the future do not fail if
the mercurial server's fingerprint is different at that time.

MozReview-Commit-ID: GTermkwGgdb
2016-05-10 15:46:24 -05:00
J. Ryan Stinnett 9562eb1da5 Bug 1270596 - Upgrade to ESLint 2.9.0. r=ahal
MozReview-Commit-ID: IylFUWf1HVG
2016-05-06 10:41:04 -05:00
Maja Frydrychowicz 242c50c69f Bug 1269560 - Add a pip.conf to desktop-build; r=dustin
MozReview-Commit-ID: 132q8GyycYo
2016-05-02 21:40:22 -04:00
Sebastian Kaspari a15282670d Bug 1263390 - Use Gradle 2.10 and Android Gradle plugin 2.0. r=mcomella
MozReview-Commit-ID: SR6rhVroKv
2016-04-19 20:01:38 +02:00
Gregory Arndt b5df9f9c2a Bug 1266719 - Add retry and timeout options when downloading image context r=wcosta
MozReview-Commit-ID: BTpHZa4PX0G
2016-04-22 06:43:24 -05:00
Carsten "Tomcat" Book 35733ed1f1 merge mozilla-inbound to mozilla-central a=merge 2016-04-20 11:50:29 +02:00
Ralph Giles 82f9938e6d Bug 1265817 - Update gecko-rust-build to v0.2.1. r=dustin
- Move to quay.io/rust builder base.
- Set stable channel to work around compatibility checks with upstream
  rust-std builds.
- Updates for stable rust changes.
- Rough repack script for packaging upstream builds for tooltool.

Merge changes from https://github.com/rillian/rust-build tag v0.2.1.

MozReview-Commit-ID: 4rcrUCg2CSw
2016-04-19 10:41:18 -07:00