зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1545368 - Support fetches in run-task on generic-worker. r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D28048 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
33a06d6450
Коммит
ca39c407dd
|
@ -495,6 +495,10 @@ def fetch_artifacts():
|
|||
'scripts', 'misc', 'fetch-content')
|
||||
|
||||
if not fetch_content or not os.path.isfile(fetch_content):
|
||||
fetch_content = os.path.join(os.path.dirname(__file__),
|
||||
'fetch-content')
|
||||
|
||||
if not os.path.isfile(fetch_content):
|
||||
print(FETCH_CONTENT_NOT_FOUND)
|
||||
sys.exit(1)
|
||||
|
||||
|
|
|
@ -81,9 +81,11 @@ worker_defaults = {
|
|||
}
|
||||
|
||||
|
||||
def run_task_url(config):
|
||||
return '{}/raw-file/{}/taskcluster/scripts/run-task'.format(
|
||||
config.params['head_repository'], config.params['head_rev'])
|
||||
def script_url(config, script):
|
||||
return '{}/raw-file/{}/taskcluster/scripts/{}'.format(
|
||||
config.params['head_repository'],
|
||||
config.params['head_rev'],
|
||||
script)
|
||||
|
||||
|
||||
@run_job_using("docker-worker", "run-task", schema=run_task_schema, defaults=worker_defaults)
|
||||
|
@ -141,10 +143,17 @@ def generic_worker_run_task(config, job, taskdesc):
|
|||
})
|
||||
worker['mounts'].append({
|
||||
'content': {
|
||||
'url': run_task_url(config),
|
||||
'url': script_url(config, 'run-task'),
|
||||
},
|
||||
'file': './run-task',
|
||||
})
|
||||
if worker.get('env', {}).get('MOZ_FETCHES'):
|
||||
worker['mounts'].append({
|
||||
'content': {
|
||||
'url': script_url(config, 'misc/fetch-content'),
|
||||
},
|
||||
'file': './fetch-content',
|
||||
})
|
||||
|
||||
run_command = run['command']
|
||||
if isinstance(run_command, basestring):
|
||||
|
|
Загрузка…
Ссылка в новой задаче