Bug 1673992 - [taskgraph] Ensure we stop extracting mozharness.zip in the cwd r=bhearsum

Rather than putting a top-level "mozharness" directory in "mozharness.zip",
this puts the root of mozharness at the root of the archive. Then we extract
the archive into a "mozharness" directory. This way the path on disk ends up
being the same, but generic-worker won't attempt to modify the permissions of
files in the cwd.

Differential Revision: https://phabricator.services.mozilla.com/D95138
This commit is contained in:
Andrew Halberstadt 2020-10-29 17:30:56 +00:00
Родитель 85b675fb77
Коммит 93710a04d5
3 изменённых файлов: 7 добавлений и 14 удалений

Просмотреть файл

@ -369,50 +369,43 @@ ARCHIVE_FILES = {
"mozharness": [
{
"source": buildconfig.topsrcdir,
"base": "testing",
"pattern": "mozharness/**",
"base": "testing/mozharness",
"pattern": "**",
},
{
"source": buildconfig.topsrcdir,
"base": "third_party/python/virtualenv",
"dest": "mozharness/third_party/python/virtualenv",
"pattern": "**",
"base": "",
"pattern": "third_party/python/virtualenv/**",
},
{
"source": buildconfig.topsrcdir,
"base": "testing/mozbase/manifestparser",
"pattern": "manifestparser/**",
"dest": "mozharness",
},
{
"source": buildconfig.topsrcdir,
"base": "testing/mozbase/mozfile",
"pattern": "mozfile/**",
"dest": "mozharness",
},
{
"source": buildconfig.topsrcdir,
"base": "testing/mozbase/mozinfo",
"pattern": "mozinfo/**",
"dest": "mozharness",
},
{
"source": buildconfig.topsrcdir,
"base": "testing/mozbase/mozprocess",
"pattern": "mozprocess/**",
"dest": "mozharness",
},
{
"source": buildconfig.topsrcdir,
"base": "third_party/python/six",
"pattern": "six.py",
"dest": "mozharness",
},
{
"source": buildconfig.topsrcdir,
"base": "third_party/python/distro",
"pattern": "distro.py",
"dest": "mozharness",
},
],
"reftest": [
@ -782,7 +775,7 @@ if buildconfig.substs.get("commtopsrcdir"):
"source": commtopsrcdir,
"base": "mozharness",
"pattern": "**",
"dest": "mozharness/configs",
"dest": "configs",
}
ARCHIVE_FILES["mozharness"].append(mozharness_comm)
marionette_comm = {

Просмотреть файл

@ -122,7 +122,7 @@ download_mozharness() {
while [[ $attempt < $max_attempts ]]; do
if curl --fail -o mozharness.zip --retry 10 -L $MOZHARNESS_URL; then
rm -rf mozharness
if unzip -q mozharness.zip; then
if unzip -q mozharness.zip -d mozharness; then
return 0
fi
echo "error unzipping mozharness.zip" >&2

Просмотреть файл

@ -406,7 +406,7 @@ def mozharness_test_on_generic_worker(config, job, taskdesc):
worker["mounts"] = [
{
"directory": ".",
"directory": "mozharness",
"content": {
"artifact": get_artifact_path(taskdesc, "mozharness.zip"),
"task-id": {"task-reference": "<build>"},