mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Backed out 7 changesets (bug 1168979) for breaking the gecko decision task on a CLOSED TREE.
Backed out changeset 0d9496880482 (bug 1168979) Backed out changeset 913594264a8c (bug 1168979) Backed out changeset 18560f41c3fb (bug 1168979) Backed out changeset dd5644a30469 (bug 1168979) Backed out changeset 162318c4e626 (bug 1168979) Backed out changeset 5bfd2e72d330 (bug 1168979) Backed out changeset 0d97c2ab4fe4 (bug 1168979)
This commit is contained in:
parent
6b54a8373b
commit
35cc22a996
@ -112,49 +112,6 @@ def decorate_task_treeherder_routes(task, suffix):
|
||||
for env in treeheder_env:
|
||||
task['routes'].append('{}.{}'.format(TREEHERDER_ROUTES[env], suffix))
|
||||
|
||||
def configure_dependent_task(task_path, parameters, taskid, templates, build_treeherder_config):
|
||||
"""
|
||||
Configure a build dependent task. This is shared between post-build and test tasks.
|
||||
|
||||
:param task_path: location to the task yaml
|
||||
:param parameters: parameters to load the template
|
||||
:param taskid: taskid of the dependent task
|
||||
:param templates: reference to the template builder
|
||||
:param build_treeherder_config: parent treeherder config
|
||||
:return: the configured task
|
||||
"""
|
||||
task = templates.load(task_path, parameters)
|
||||
task['taskId'] = taskid
|
||||
|
||||
if 'requires' not in task:
|
||||
task['requires'] = []
|
||||
|
||||
task['requires'].append(parameters['build_slugid'])
|
||||
|
||||
if 'treeherder' not in task['task']['extra']:
|
||||
task['task']['extra']['treeherder'] = {}
|
||||
|
||||
# Copy over any treeherder configuration from the build so
|
||||
# tests show up under the same platform...
|
||||
treeherder_config = task['task']['extra']['treeherder']
|
||||
|
||||
treeherder_config['collection'] = \
|
||||
build_treeherder_config.get('collection', {})
|
||||
|
||||
treeherder_config['build'] = \
|
||||
build_treeherder_config.get('build', {})
|
||||
|
||||
treeherder_config['machine'] = \
|
||||
build_treeherder_config.get('machine', {})
|
||||
|
||||
if 'routes' not in task['task']:
|
||||
task['task']['routes'] = []
|
||||
|
||||
if 'scopes' not in task['task']:
|
||||
task['task']['scopes'] = []
|
||||
|
||||
return task
|
||||
|
||||
@CommandProvider
|
||||
class DecisionTask(object):
|
||||
@Command('taskcluster-decision', category="ci",
|
||||
@ -374,16 +331,6 @@ class Graph(object):
|
||||
message = '({}), extra.treeherder.collection must contain one type'
|
||||
raise ValueError(message.fomrat(build['task']))
|
||||
|
||||
for post_build in build['post-build']:
|
||||
# copy over the old parameters to update the template
|
||||
post_parameters = copy.copy(build_parameters)
|
||||
post_task = configure_dependent_task(post_build['task'],
|
||||
post_parameters,
|
||||
slugid(),
|
||||
templates,
|
||||
build_treeherder_config)
|
||||
graph['tasks'].append(post_task)
|
||||
|
||||
for test in build['dependents']:
|
||||
test = test['allowed_build_tasks'][build['task']]
|
||||
test_parameters = copy.copy(build_parameters)
|
||||
@ -393,6 +340,7 @@ class Graph(object):
|
||||
test_parameters['tests_url'] = tests_url
|
||||
if test_packages_url:
|
||||
test_parameters['test_packages_url'] = test_packages_url
|
||||
|
||||
test_definition = templates.load(test['task'], {})['task']
|
||||
chunk_config = test_definition['extra']['chunks']
|
||||
|
||||
@ -408,11 +356,35 @@ class Graph(object):
|
||||
continue
|
||||
|
||||
test_parameters['chunk'] = chunk
|
||||
test_task = configure_dependent_task(test['task'],
|
||||
test_parameters,
|
||||
slugid(),
|
||||
templates,
|
||||
build_treeherder_config)
|
||||
test_task = templates.load(test['task'], test_parameters)
|
||||
test_task['taskId'] = slugid()
|
||||
|
||||
if 'requires' not in test_task:
|
||||
test_task['requires'] = []
|
||||
|
||||
test_task['requires'].append(test_parameters['build_slugid'])
|
||||
|
||||
if 'treeherder' not in test_task['task']['extra']:
|
||||
test_task['task']['extra']['treeherder'] = {}
|
||||
|
||||
# Copy over any treeherder configuration from the build so
|
||||
# tests show up under the same platform...
|
||||
test_treeherder_config = test_task['task']['extra']['treeherder']
|
||||
|
||||
test_treeherder_config['collection'] = \
|
||||
build_treeherder_config.get('collection', {})
|
||||
|
||||
test_treeherder_config['build'] = \
|
||||
build_treeherder_config.get('build', {})
|
||||
|
||||
test_treeherder_config['machine'] = \
|
||||
build_treeherder_config.get('machine', {})
|
||||
|
||||
if 'routes' not in test_task['task']:
|
||||
test_task['task']['routes'] = []
|
||||
|
||||
if 'scopes' not in test_task['task']:
|
||||
test_task['task']['scopes'] = []
|
||||
|
||||
if params['revision_hash']:
|
||||
decorate_task_treeherder_routes(
|
||||
|
@ -259,18 +259,9 @@ def parse_commit(message, jobs):
|
||||
else:
|
||||
additional_parameters = {}
|
||||
|
||||
# Generate list of post build tasks that run on this build
|
||||
post_build_jobs = []
|
||||
for job_flag in jobs['flags']['post-build']:
|
||||
job = jobs['post-build'][job_flag]
|
||||
if 'allowed_build_tasks' in job and build_task not in job['allowed_build_tasks']:
|
||||
continue
|
||||
post_build_jobs.append(copy.deepcopy(job))
|
||||
|
||||
# Node for this particular build type
|
||||
result.append({
|
||||
'task': build_task,
|
||||
'post-build': post_build_jobs,
|
||||
'dependents': extract_tests_from_platform(
|
||||
jobs['tests'], platform_builds, build_task, tests
|
||||
),
|
||||
|
@ -35,9 +35,6 @@ flags:
|
||||
- android-api-11
|
||||
- linux64
|
||||
|
||||
post-build:
|
||||
- upload-symbols
|
||||
|
||||
tests:
|
||||
- cppunit
|
||||
- crashtest
|
||||
|
@ -177,14 +177,6 @@ builds:
|
||||
debug:
|
||||
task: tasks/builds/sm_warnaserrdebug.yml
|
||||
|
||||
post-build:
|
||||
upload-symbols:
|
||||
allowed_build_tasks:
|
||||
- tasks/builds/opt_linux64.yml
|
||||
- tasks/builds/dbg_linux64.yml
|
||||
- tasks/builds/android_api_11.yml
|
||||
task: tasks/post-builds/upload_symbols.yml
|
||||
|
||||
tests:
|
||||
cppunit:
|
||||
allowed_build_tasks:
|
||||
|
@ -1,41 +0,0 @@
|
||||
# This is a sample task for uploading debug symbols to the socorro api
|
||||
---
|
||||
taskId: {{taskId}}
|
||||
|
||||
task:
|
||||
created: '{{now}}'
|
||||
deadline: '{{#from_now}}24 hours{{/from_now}}'
|
||||
metadata:
|
||||
source: http://todo.com/soon
|
||||
owner: amiyaguchi@mozilla.com
|
||||
name: '[TC] Upload Symbols'
|
||||
description: 'Upload Symbols'
|
||||
tags:
|
||||
createdForUser: {{owner}}
|
||||
|
||||
workerType: symbol-upload
|
||||
provisionerId: aws-provisioner-v1
|
||||
schedulerId: task-graph-scheduler
|
||||
|
||||
scopes: ['docker-worker:image:taskclusterprivate/upload_symbols:0.0.3']
|
||||
|
||||
payload:
|
||||
image: 'taskclusterprivate/upload_symbols:0.0.3'
|
||||
|
||||
maxRunTime: 600
|
||||
|
||||
command: ["/bin/bash", "bin/upload.sh"]
|
||||
|
||||
env:
|
||||
GECKO_HEAD_REPOSITORY: '{{head_repository}}'
|
||||
GECKO_HEAD_REV: '{{head_rev}}'
|
||||
ARTIFACT_TASKID: '{{build_slugid}}'
|
||||
|
||||
extra:
|
||||
treeherderEnv:
|
||||
- production
|
||||
- staging
|
||||
treeherder:
|
||||
groupSymbol: tc
|
||||
groupName: Submitted by taskcluster
|
||||
symbol: us
|
@ -19,16 +19,9 @@ import redo
|
||||
import requests
|
||||
import sys
|
||||
|
||||
try:
|
||||
from buildconfig import substs
|
||||
except ImportError:
|
||||
# Allow standalone use of this script, for use in TaskCluster
|
||||
from os import environ as substs
|
||||
from buildconfig import substs
|
||||
|
||||
url = 'https://crash-stats.mozilla.com/symbols/upload'
|
||||
# Allow overwriting of the upload url with an environmental variable
|
||||
if 'SOCORRO_SYMBOL_UPLOAD_URL' in os.environ:
|
||||
url = os.environ['SOCORRO_SYMBOL_UPLOAD_URL']
|
||||
MAX_RETRIES = 5
|
||||
|
||||
def print_error(r):
|
||||
|
Loading…
x
Reference in New Issue
Block a user