diff --git a/build/docker/gaia-taskenv/Dockerfile b/build/docker/gaia-taskenv/Dockerfile index ae0bea001975..9b8fab967958 100644 --- a/build/docker/gaia-taskenv/Dockerfile +++ b/build/docker/gaia-taskenv/Dockerfile @@ -1,13 +1,5 @@ -from lightsofapollo/ubuntu-node:latest -maintainer James Lal - -# start by installing all our ubuntu packages -run sudo apt-get -y upgrade --fix-missing -run sudo apt-get -y update --fix-missing -run sudo apt-get -yq install git-core curl wget firefox build-essential xvfb \ - python-pip man python-virtualenv libgtk-3-0 - -run useradd -d /home/tester -s /bin/bash -m tester; +from taskcluster/tester:0.3.6 +maintainer Aus Lacroix # install our custom git plugin copy git/target/doc/git-ci-checkout-pr.1 /usr/local/man/man1/git-ci-checkout-pr.1 @@ -17,20 +9,9 @@ copy git/git-ci-checkout-pr /usr/local/bin/git-ci-checkout-pr copy git/git-ci-checkout-ref /usr/local/bin/git-ci-checkout-ref copy git/git-ci-checkout-setup /usr/local/bin/git-ci-checkout-setup -env HOME /home/tester -env SHELL /bin/bash -env USER tester -env LOGNAME tester -env PATH $PATH:/home/tester/bin -workdir /home/tester - run git config --global user.email "gaia@mozilla.com" run git config --global user.name "gaia-taskenv" -run npm install npm@latest -g -run npm install taskcluster-vcs@2.3.4 -g -run npm install taskcluster-npm-cache@1.1.14 -g # run some more root commands which change frequently -copy ./bin/entrypoint /home/tester/bin/entrypoint -copy ./bin/buildbot_step /home/tester/bin/buildbot_step -run chmod a+x /home/tester/bin/entrypoint +copy ./bin/entrypoint /home/worker/bin/entrypoint +run chmod a+x /home/worker/bin/entrypoint diff --git a/build/docker/gaia-taskenv/VERSION b/build/docker/gaia-taskenv/VERSION index ac39a106c485..26aaba0e8663 100644 --- a/build/docker/gaia-taskenv/VERSION +++ b/build/docker/gaia-taskenv/VERSION @@ -1 +1 @@ -0.9.0 +1.2.0 diff --git a/build/docker/gaia-taskenv/bin/entrypoint b/build/docker/gaia-taskenv/bin/entrypoint index c8b7d3444cf4..f5140b3e1e08 100755 --- a/build/docker/gaia-taskenv/bin/entrypoint +++ b/build/docker/gaia-taskenv/bin/entrypoint @@ -2,35 +2,25 @@ source ./bin/buildbot_step -export DISPLAY=:99 -Xvfb :99 > /dev/null 2>&1 & +Xvfb :0 -nolisten tcp -screen 0 1600x1200x24 2>/dev/null & +export DISPLAY=:0 checkout_path="$PWD/git_checkout" # Handle initial clone and caching of the initial clone... -step_clone() { +step_checkout() { # Extract the cached clone (this is kept as a tarball to always keep a clean # working state without worrying about tree issues). - tc-vcs checkout $checkout_path $GITHUB_BASE_GIT -} - -# Run the checkout to the correct url, etc... -step_checkout() { - # TODO: There is a high probability this would be way nicer using getopt and - # ditching the environment variables (either in bash or python) if [ "$GITHUB_PULL_REQUEST" == "1" ]; then - time git ci-checkout-pr \ - $checkout_path \ + tc-vcs checkout $checkout_path \ $GITHUB_BASE_GIT \ - $GITHUB_BASE_BRANCH \ - $GITHUB_BASE_REV \ $GITHUB_HEAD_GIT \ $GITHUB_HEAD_BRANCH \ - $GITHUB_HEAD_REV + $GITHUB_HEAD_REV_ else - time git ci-checkout-ref \ - $checkout_path \ + tc-vcs checkout $checkout_path \ + $GITHUB_BASE_GIT \ $GITHUB_HEAD_GIT \ $GITHUB_HEAD_BRANCH \ $GITHUB_HEAD_REV @@ -42,7 +32,6 @@ step_npm_cache() { taskcluster-npm-cache-get --namespace gaia.npm_cache ./package.json } -buildbot_step 'git clone cache' step_clone buildbot_step 'git checkout' step_checkout # From here on we to operate inside of the actual checkout mostly for diff --git a/build/docker/gaia-taskenv/run b/build/docker/gaia-taskenv/run index 11549201f3b7..751c0d6d6907 100755 --- a/build/docker/gaia-taskenv/run +++ b/build/docker/gaia-taskenv/run @@ -1,4 +1,4 @@ #! /bin/bash -e ./build -docker run $@ -v $PWD/bin:/home/tester/bin -i -t $(cat DOCKER_TAG):$(cat VERSION) /bin/bash +docker run $@ -v $PWD/bin:/home/worker/bin -i -t $(cat DOCKER_TAG):$(cat VERSION) /bin/bash diff --git a/taskgraph.json b/taskgraph.json index 7fb578cd6254..0a5f0381ceda 100644 --- a/taskgraph.json +++ b/taskgraph.json @@ -16,6 +16,7 @@ "workerType": "gaia-decision", "scopes": [ "docker-worker:cache:tc-vcs", + "docker-worker:cache:linux-cache", "docker-worker:cache:gaia-misc-caches", "docker-worker:image:quay.io/mozilla/raptor-tester:latest", "queue:define-task:aws-provisioner/gaia", @@ -23,9 +24,11 @@ ], "payload": { "cache": { - "gaia-misc-caches": "/home/tester/caches/" + "gaia-misc-caches": "/home/worker/caches/", + "tc-vcs":"/home/worker/.tc-vcs", + "linux-cache":"/home/worker/.cache" }, - "image": "taskcluster/gaia-taskenv:0.9.0", + "image": "taskcluster/gaia-taskenv:1.2.0", "command": [ "entrypoint", "echo 'what' && node tests/taskcluster/bin/graph > /graph.json && cat /graph.json" @@ -37,7 +40,7 @@ "artifacts": { "public/package.json": { "type": "file", - "path": "/home/tester/git_checkout/package.json", + "path": "/home/worker/git_checkout/package.json", "expires": "2016-03-30T11:59:00.000Z" } }, diff --git a/tests/taskcluster/autolander.yml b/tests/taskcluster/autolander.yml index cab8dbdeb9e0..c70378d896cf 100644 --- a/tests/taskcluster/autolander.yml +++ b/tests/taskcluster/autolander.yml @@ -6,7 +6,7 @@ params: provisionerId: 'aws-provisioner-v1' workerType: gaia # Location in image where we store the gaia contents. - gaia: '/home/tester/git_checkout' + gaia: '/home/worker/git_checkout' # All task definitions definitions: diff --git a/tests/taskcluster/bootstrap.yml b/tests/taskcluster/bootstrap.yml index 0469003d558f..022e88950955 100644 --- a/tests/taskcluster/bootstrap.yml +++ b/tests/taskcluster/bootstrap.yml @@ -17,7 +17,7 @@ task: image: taskcluster/npm-cache:0.1.10 cache: - gaia-misc-caches: /home/tester/caches/ + gaia-misc-caches: /home/worker/caches/ command: - entrypoint diff --git a/tests/taskcluster/tasks.yml b/tests/taskcluster/tasks.yml index 5d9f2955a641..e311cde8af49 100644 --- a/tests/taskcluster/tasks.yml +++ b/tests/taskcluster/tasks.yml @@ -10,7 +10,7 @@ params: provisionerId: 'aws-provisioner-v1' workerType: gaia # Location in image where we store the gaia contents. - gaia: '/home/tester/git_checkout' + gaia: '/home/worker/git_checkout' # All task definitions definitions: diff --git a/tests/taskcluster/tasks/build_integration.yml b/tests/taskcluster/tasks/build_integration.yml index 5c3725d3ae17..285502cb157d 100644 --- a/tests/taskcluster/tasks/build_integration.yml +++ b/tests/taskcluster/tasks/build_integration.yml @@ -13,7 +13,7 @@ task: payload: cache: - gaia-misc-caches: /home/tester/caches/ + gaia-misc-caches: /home/worker/caches/ env: REPORTER: 'mocha-tbpl-reporter' diff --git a/tests/taskcluster/tasks/build_unit.yml b/tests/taskcluster/tasks/build_unit.yml index a9268274e18f..442d55c0205a 100644 --- a/tests/taskcluster/tasks/build_unit.yml +++ b/tests/taskcluster/tasks/build_unit.yml @@ -13,7 +13,7 @@ task: payload: cache: - gaia-misc-caches: /home/tester/caches/ + gaia-misc-caches: /home/worker/caches/ env: REPORTER: 'mocha-tbpl-reporter' diff --git a/tests/taskcluster/tasks/csslint.yml b/tests/taskcluster/tasks/csslint.yml index 5dc2322ccafb..79dd3bab9743 100644 --- a/tests/taskcluster/tasks/csslint.yml +++ b/tests/taskcluster/tasks/csslint.yml @@ -15,7 +15,7 @@ task: NODE_MODULES_SRC: npm-cache cache: - gaia-misc-caches: /home/tester/caches/ + gaia-misc-caches: /home/worker/caches/ command: - entrypoint diff --git a/tests/taskcluster/tasks/eslint.yml b/tests/taskcluster/tasks/eslint.yml index d0ede68fb518..78f7d472814a 100644 --- a/tests/taskcluster/tasks/eslint.yml +++ b/tests/taskcluster/tasks/eslint.yml @@ -16,7 +16,7 @@ task: NODE_MODULES_SRC: npm-cache cache: - gaia-misc-caches: /home/tester/caches/ + gaia-misc-caches: /home/worker/caches/ command: - entrypoint diff --git a/tests/taskcluster/tasks/gaia_ui_tests.yml b/tests/taskcluster/tasks/gaia_ui_tests.yml index 46160e52ba6e..a3982cc1179e 100644 --- a/tests/taskcluster/tasks/gaia_ui_tests.yml +++ b/tests/taskcluster/tasks/gaia_ui_tests.yml @@ -15,7 +15,7 @@ task: payload: cache: - gaia-misc-caches: /home/tester/caches/ + gaia-misc-caches: /home/worker/caches/ # See: ci/gaia_ui_tests/script for how this ties into the built in # chunking functionality for the test scripts... env: diff --git a/tests/taskcluster/tasks/jshint.yml b/tests/taskcluster/tasks/jshint.yml index 1f0350cff984..6ba28bea2a58 100644 --- a/tests/taskcluster/tasks/jshint.yml +++ b/tests/taskcluster/tasks/jshint.yml @@ -14,7 +14,7 @@ task: env: NODE_MODULES_SRC: npm-cache cache: - gaia-misc-caches: /home/tester/caches/ + gaia-misc-caches: /home/worker/caches/ command: - entrypoint - ./bin/ci run jshint diff --git a/tests/taskcluster/tasks/jsmarionette_unit_tests.yml b/tests/taskcluster/tasks/jsmarionette_unit_tests.yml index e8f48dc642b1..228e492cbe76 100644 --- a/tests/taskcluster/tasks/jsmarionette_unit_tests.yml +++ b/tests/taskcluster/tasks/jsmarionette_unit_tests.yml @@ -13,7 +13,7 @@ task: payload: cache: - gaia-misc-caches: /home/tester/caches/ + gaia-misc-caches: /home/worker/caches/ env: REPORTER: 'mocha-tbpl-reporter' diff --git a/tests/taskcluster/tasks/jsonlint.yml b/tests/taskcluster/tasks/jsonlint.yml index e25586d6846b..8331eb370849 100644 --- a/tests/taskcluster/tasks/jsonlint.yml +++ b/tests/taskcluster/tasks/jsonlint.yml @@ -14,7 +14,7 @@ task: env: NODE_MODULES_SRC: npm-cache cache: - gaia-misc-caches: /home/tester/caches/ + gaia-misc-caches: /home/worker/caches/ command: - entrypoint - ./bin/ci run jsonlint diff --git a/tests/taskcluster/tasks/marionette_js_tests.yml b/tests/taskcluster/tasks/marionette_js_tests.yml index bd625ec126c5..6d8a8084e8ee 100644 --- a/tests/taskcluster/tasks/marionette_js_tests.yml +++ b/tests/taskcluster/tasks/marionette_js_tests.yml @@ -8,15 +8,9 @@ task: workerType: '{{workerType}}' provisionerId: '{{provisionerId}}' - scopes: - # Source caches contains various sources (including a tarball of gaia source - # tree) - - docker-worker:cache:gaia-misc-caches - payload: maxRunTime: 7200 - cache: - gaia-misc-caches: /home/tester/caches/ + # Chunking logic is actually in the Makefile here which may make it # confusing to figure out who calls what this should be improved. env: diff --git a/tests/taskcluster/tasks/marionette_js_tv_tests.yml b/tests/taskcluster/tasks/marionette_js_tv_tests.yml index 5f8e6c0a1855..ae6e5d071fcb 100644 --- a/tests/taskcluster/tasks/marionette_js_tv_tests.yml +++ b/tests/taskcluster/tasks/marionette_js_tv_tests.yml @@ -16,7 +16,7 @@ task: payload: maxRunTime: 7200 cache: - gaia-misc-caches: /home/tester/caches/ + gaia-misc-caches: /home/worker/caches/ # Chunking logic is actually in the Makefile here which may make it # confusing to figure out who calls what this should be improved. env: diff --git a/tests/taskcluster/tasks/unit_tests_b2g.yml b/tests/taskcluster/tasks/unit_tests_b2g.yml index c435489f9780..ed910bc1680e 100644 --- a/tests/taskcluster/tasks/unit_tests_b2g.yml +++ b/tests/taskcluster/tasks/unit_tests_b2g.yml @@ -13,7 +13,7 @@ task: payload: cache: - gaia-misc-caches: /home/tester/caches/ + gaia-misc-caches: /home/worker/caches/ # Chunking logic is handled in ci/unit-tests-in-b2g/script env: