зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1687594 - Remove the --authentication-file option to `mach artifact toolchain`. r=firefox-build-system-reviewers,mhentges
It has been a no-op since bug 1595368. Differential Revision: https://phabricator.services.mozilla.com/D102374
This commit is contained in:
Родитель
3580d30873
Коммит
32ec3e64de
|
@ -240,11 +240,6 @@ class PackageFrontend(MachCommandBase):
|
|||
metavar="MANIFEST",
|
||||
help="Explicit tooltool manifest to process",
|
||||
)
|
||||
@CommandArgument(
|
||||
"--authentication-file",
|
||||
metavar="FILE",
|
||||
help="Use the RelengAPI token found in the given file to authenticate",
|
||||
)
|
||||
@CommandArgument(
|
||||
"--no-unpack", action="store_true", help="Do not unpack any downloaded file"
|
||||
)
|
||||
|
@ -275,7 +270,6 @@ class PackageFrontend(MachCommandBase):
|
|||
skip_cache=False,
|
||||
from_build=(),
|
||||
tooltool_manifest=None,
|
||||
authentication_file=None,
|
||||
no_unpack=False,
|
||||
retry=0,
|
||||
bootstrap=False,
|
||||
|
|
|
@ -27,15 +27,12 @@ esac
|
|||
case "$OSTYPE" in
|
||||
darwin*)
|
||||
PLATFORM_OS=macosx
|
||||
TOOLTOOL_AUTH_FILE=/builds/relengapi.tok
|
||||
;;
|
||||
linux-gnu)
|
||||
PLATFORM_OS=linux
|
||||
TOOLTOOL_AUTH_FILE=/builds/relengapi.tok
|
||||
;;
|
||||
msys)
|
||||
PLATFORM_OS=win
|
||||
TOOLTOOL_AUTH_FILE=c:/builds/relengapi.tok
|
||||
;;
|
||||
*)
|
||||
echo "Unrecognized OSTYPE '$OSTYPE'" >&2
|
||||
|
@ -43,19 +40,12 @@ case "$OSTYPE" in
|
|||
;;
|
||||
esac
|
||||
|
||||
TOOLTOOL_AUTH_FLAGS=
|
||||
|
||||
if [ -e "$TOOLTOOL_AUTH_FILE" ]; then
|
||||
# When the worker has the relengapi token pass it down
|
||||
TOOLTOOL_AUTH_FLAGS="--authentication-file=$TOOLTOOL_AUTH_FILE"
|
||||
fi
|
||||
|
||||
# Install everything needed for the browser on this platform. Not all of it is
|
||||
# necessary for the JS shell, but it's less duplication to share tooltool
|
||||
# manifests.
|
||||
BROWSER_PLATFORM=$PLATFORM_OS$BITS
|
||||
|
||||
(cd $TOOLTOOL_CHECKOUT && ${GECKO_PATH}/mach artifact toolchain${TOOLTOOL_MANIFEST:+ -v $TOOLTOOL_AUTH_FLAGS --tooltool-manifest $GECKO_PATH/$TOOLTOOL_MANIFEST}${TOOLTOOL_CACHE:+ --cache-dir $TOOLTOOL_CACHE}${MOZ_TOOLCHAINS:+ ${MOZ_TOOLCHAINS}})
|
||||
(cd $TOOLTOOL_CHECKOUT && ${GECKO_PATH}/mach artifact toolchain${TOOLTOOL_MANIFEST:+ -v --tooltool-manifest $GECKO_PATH/$TOOLTOOL_MANIFEST}${TOOLTOOL_CACHE:+ --cache-dir $TOOLTOOL_CACHE}${MOZ_TOOLCHAINS:+ ${MOZ_TOOLCHAINS}})
|
||||
|
||||
) || exit 1 # end of set -e scope
|
||||
|
||||
|
|
|
@ -2,22 +2,8 @@
|
|||
|
||||
cd $MOZ_FETCHES_DIR
|
||||
|
||||
case "`uname -s`" in
|
||||
Linux)
|
||||
TOOLTOOL_AUTH_FILE=/builds/relengapi.tok
|
||||
;;
|
||||
MINGW*)
|
||||
TOOLTOOL_AUTH_FILE=c:/builds/relengapi.tok
|
||||
;;
|
||||
esac
|
||||
|
||||
TOOLTOOL_DL_FLAGS=
|
||||
|
||||
if [ -e "$TOOLTOOL_AUTH_FILE" ]; then
|
||||
# When the worker has the relengapi token pass it down
|
||||
TOOLTOOL_DL_FLAGS="${TOOLTOOL_DL_FLAGS=} --authentication-file=$TOOLTOOL_AUTH_FILE"
|
||||
fi
|
||||
|
||||
if [ -n "$UPLOAD_DIR" ]; then
|
||||
TOOLTOOL_DL_FLAGS="${TOOLTOOL_DL_FLAGS=} --artifact-manifest $UPLOAD_DIR/toolchains.json"
|
||||
fi
|
||||
|
|
|
@ -38,7 +38,6 @@ config = {
|
|||
# Tooltool related
|
||||
"tooltool_cache": os.path.join(LOCAL_WORKDIR, "builds/tooltool_cache"),
|
||||
"tooltool_cache_path": os.path.join(LOCAL_WORKDIR, "builds/tooltool_cache"),
|
||||
"tooltool_authentication_file": os.path.join(LOCAL_WORKDIR, "relengapi.tok"),
|
||||
# VCS tools
|
||||
"gittool.py": "http://hg.mozilla.org/build/puppet/raw-file/faaf5abd792e/modules/packages/files/gittool.py",
|
||||
# Android related
|
||||
|
|
|
@ -726,24 +726,6 @@ items from that key's value."
|
|||
abs_mozconfig_path, os.path.join(dirs["abs_src_dir"], ".mozconfig")
|
||||
)
|
||||
|
||||
# TODO: replace with ToolToolMixin
|
||||
def _get_tooltool_auth_file(self):
|
||||
# set the default authentication file based on platform; this
|
||||
# corresponds to where puppet puts the token
|
||||
if "tooltool_authentication_file" in self.config:
|
||||
fn = self.config["tooltool_authentication_file"]
|
||||
elif self._is_windows():
|
||||
fn = r"c:\builds\relengapi.tok"
|
||||
else:
|
||||
fn = "/builds/relengapi.tok"
|
||||
|
||||
# if the file doesn't exist, don't pass it to tooltool (it will just
|
||||
# fail). In taskcluster, this will work OK as the relengapi-proxy will
|
||||
# take care of auth. Everywhere else, we'll get auth failures if
|
||||
# necessary.
|
||||
if os.path.exists(fn):
|
||||
return fn
|
||||
|
||||
def _run_tooltool(self):
|
||||
env = self.query_build_env()
|
||||
env.update(self.query_mach_build_env())
|
||||
|
@ -775,9 +757,6 @@ items from that key's value."
|
|||
os.path.join(dirs["abs_src_dir"], manifest_src),
|
||||
]
|
||||
)
|
||||
auth_file = self._get_tooltool_auth_file()
|
||||
if auth_file:
|
||||
cmd.extend(["--authentication-file", auth_file])
|
||||
cache = c["env"].get("TOOLTOOL_CACHE")
|
||||
if cache:
|
||||
cmd.extend(["--cache-dir", cache])
|
||||
|
|
|
@ -22,29 +22,9 @@ _external_tools_path = os.path.normpath(
|
|||
class TooltoolMixin(object):
|
||||
"""Mixin class for handling tooltool manifests.
|
||||
To use a tooltool server other than the Mozilla server, set
|
||||
TOOLTOOL_HOST in the environment. To specify a different authentication
|
||||
file than that used in releng automation,override
|
||||
config['tooltool_authentication_file']; set it to None to not pass
|
||||
any authentication information (OK for public files)
|
||||
TOOLTOOL_HOST in the environment.
|
||||
"""
|
||||
|
||||
def _get_auth_file(self):
|
||||
# set the default authentication file based on platform; this
|
||||
# corresponds to where puppet puts the token
|
||||
if "tooltool_authentication_file" in self.config:
|
||||
fn = self.config["tooltool_authentication_file"]
|
||||
elif self._is_windows():
|
||||
fn = r"c:\builds\relengapi.tok"
|
||||
else:
|
||||
fn = "/builds/relengapi.tok"
|
||||
|
||||
# if the file doesn't exist, don't pass it to tooltool (it will just
|
||||
# fail). In taskcluster, this will work OK as the relengapi-proxy will
|
||||
# take care of auth. Everywhere else, we'll get auth failures if
|
||||
# necessary.
|
||||
if os.path.exists(fn):
|
||||
return fn
|
||||
|
||||
def tooltool_fetch(self, manifest, output_dir=None, privileged=False, cache=None):
|
||||
"""docstring for tooltool_fetch"""
|
||||
if cache is None:
|
||||
|
@ -69,11 +49,6 @@ class TooltoolMixin(object):
|
|||
os.path.join(_external_tools_path, "tooltool.py"),
|
||||
]
|
||||
|
||||
# handle authentication file, if given
|
||||
auth_file = self._get_auth_file()
|
||||
if auth_file and os.path.exists(auth_file):
|
||||
cmd.extend(["--authentication-file", auth_file])
|
||||
|
||||
if self.topsrcdir:
|
||||
cmd.extend(["--tooltool-manifest", manifest])
|
||||
cmd.extend(
|
||||
|
|
|
@ -452,24 +452,6 @@ class DesktopSingleLocale(LocalesMixin, AutomationMixin, VCSMixin, BaseScript):
|
|||
"""creates the repacks and udpates"""
|
||||
self._map(self.repack_locale, self.query_locales())
|
||||
|
||||
# TODO: replace with ToolToolMixin
|
||||
def _get_tooltool_auth_file(self):
|
||||
# set the default authentication file based on platform; this
|
||||
# corresponds to where puppet puts the token
|
||||
if "tooltool_authentication_file" in self.config:
|
||||
fn = self.config["tooltool_authentication_file"]
|
||||
elif self._is_windows():
|
||||
fn = r"c:\builds\relengapi.tok"
|
||||
else:
|
||||
fn = "/builds/relengapi.tok"
|
||||
|
||||
# if the file doesn't exist, don't pass it to tooltool (it will just
|
||||
# fail). In taskcluster, this will work OK as the relengapi-proxy will
|
||||
# take care of auth. Everywhere else, we'll get auth failures if
|
||||
# necessary.
|
||||
if os.path.exists(fn):
|
||||
return fn
|
||||
|
||||
def _run_tooltool(self):
|
||||
env = self.query_bootstrap_env()
|
||||
config = self.config
|
||||
|
@ -501,9 +483,6 @@ class DesktopSingleLocale(LocalesMixin, AutomationMixin, VCSMixin, BaseScript):
|
|||
os.path.join(dirs["abs_src_dir"], manifest_src),
|
||||
]
|
||||
)
|
||||
auth_file = self._get_tooltool_auth_file()
|
||||
if auth_file and os.path.exists(auth_file):
|
||||
cmd.extend(["--authentication-file", auth_file])
|
||||
cache = config["bootstrap_env"].get("TOOLTOOL_CACHE")
|
||||
if cache:
|
||||
cmd.extend(["--cache-dir", cache])
|
||||
|
|
|
@ -131,9 +131,6 @@ class Repackage(BaseScript):
|
|||
os.path.join(dirs["abs_src_dir"], manifest_src),
|
||||
]
|
||||
)
|
||||
auth_file = self._get_tooltool_auth_file()
|
||||
if auth_file:
|
||||
cmd.extend(["--authentication-file", auth_file])
|
||||
cache = config.get("tooltool_cache")
|
||||
if cache:
|
||||
cmd.extend(["--cache-dir", cache])
|
||||
|
@ -142,23 +139,6 @@ class Repackage(BaseScript):
|
|||
self.info(str(cmd))
|
||||
self.run_command(cmd, cwd=dirs["abs_src_dir"], halt_on_failure=True)
|
||||
|
||||
def _get_tooltool_auth_file(self):
|
||||
# set the default authentication file based on platform; this
|
||||
# corresponds to where puppet puts the token
|
||||
if "tooltool_authentication_file" in self.config:
|
||||
fn = self.config["tooltool_authentication_file"]
|
||||
elif self._is_windows():
|
||||
fn = r"c:\builds\relengapi.tok"
|
||||
else:
|
||||
fn = "/builds/relengapi.tok"
|
||||
|
||||
# if the file doesn't exist, don't pass it to tooltool (it will just
|
||||
# fail). In taskcluster, this will work OK as the relengapi-proxy will
|
||||
# take care of auth. Everywhere else, we'll get auth failures if
|
||||
# necessary.
|
||||
if os.path.exists(fn):
|
||||
return fn
|
||||
|
||||
def _get_mozconfig(self):
|
||||
"""assign mozconfig."""
|
||||
c = self.config
|
||||
|
|
Загрузка…
Ссылка в новой задаче