зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1288567 - Pass topsrcdir into create_context_tar; r=dustin
Relying on global variables like GECKO is a bit dangerous. To facilitate testing of archive generation in subsequent commits, let's pass an path into this function. The argument is currently unused. MozReview-Commit-ID: Et1UYraflDP --HG-- extra : rebase_source : 012095bc2450c72467f3f65f71bcb4cf6efcde66
This commit is contained in:
Родитель
6cf855965e
Коммит
e44882ed6d
|
@ -143,7 +143,7 @@ class DockerImageTask(base.Task):
|
||||||
if not os.path.exists(os.path.dirname(destination)):
|
if not os.path.exists(os.path.dirname(destination)):
|
||||||
os.makedirs(os.path.dirname(destination))
|
os.makedirs(os.path.dirname(destination))
|
||||||
|
|
||||||
return create_context_tar(context_dir, destination, image_name)
|
return create_context_tar(GECKO, context_dir, destination, image_name)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_json(cls, task_dict):
|
def from_json(cls, task_dict):
|
||||||
|
|
|
@ -60,7 +60,7 @@ def generate_context_hash(image_path):
|
||||||
return context_hash.hexdigest()
|
return context_hash.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
def create_context_tar(context_dir, out_path, prefix):
|
def create_context_tar(topsrcdir, context_dir, out_path, prefix):
|
||||||
"""Create a context tarball.
|
"""Create a context tarball.
|
||||||
|
|
||||||
A directory ``context_dir`` containing a Dockerfile will be assembled into
|
A directory ``context_dir`` containing a Dockerfile will be assembled into
|
||||||
|
|
Загрузка…
Ссылка в новой задаче