logger = logging.getLogger(__name__) beetmover_description_schema = schema.extend({ # depname is used in taskref's to identify the taskID of the unsigned things Required('depname', default='build'): basestring, # unique label to describe this beetmover task, defaults to {dep.label}-beetmover Required('label'): basestring, # treeherder is allowed here to override any defaults we use for beetmover. See # taskcluster/taskgraph/transforms/task.py for the schema details, and the # below transforms for defaults of various values. Optional('treeherder'): task_description_schema['treeherder'], Optional('attributes'): task_description_schema['attributes'], # locale is passed only for l10n beetmoving Optional('locale'): basestring, Required('shipping-phase'): task_description_schema['shipping-phase'], # Optional until we fix asan (run_on_projects?) Optional('shipping-product'): task_description_schema['shipping-product'], }) transforms = TransformSequence() transforms.add_validate(beetmover_description_schema)
l10n_description_schema = schema.extend({ # Name for this job, inferred from the dependent job before validation Required("name"): text_type, # build-platform, inferred from dependent job before validation Required("build-platform"): text_type, # max run time of the task Required("run-time"): _by_platform(int), # Locales not to repack for Required("ignore-locales"): _by_platform([text_type]), # All l10n jobs use mozharness Required("mozharness"): { # Script to invoke for mozharness Required("script"): _by_platform(text_type), # Config files passed to the mozharness script Required("config"): _by_platform([text_type]), # Additional paths to look for mozharness configs in. These should be # relative to the base of the source checkout Optional("config-paths"): [text_type], # Options to pass to the mozharness script Optional("options"): _by_platform([text_type]), # Action commands to provide to mozharness script Required("actions"): _by_platform([text_type]), # if true, perform a checkout of a comm-central based branch inside the # gecko checkout Optional("comm-checkout"): bool, }, # Items for the taskcluster index Optional("index"): { # Product to identify as in the taskcluster index Required("product"): _by_platform(text_type), # Job name to identify as in the taskcluster index Required("job-name"): _by_platform(text_type), # Type of index Optional("type"): _by_platform(text_type), }, # Description of the localized task Required("description"): _by_platform(text_type), Optional("run-on-projects"): job_description_schema["run-on-projects"], # worker-type to utilize Required("worker-type"): _by_platform(text_type), # File which contains the used locales Required("locales-file"): _by_platform(text_type), # Tooltool visibility required for task. Required("tooltool"): _by_platform(Any("internal", "public")), # Docker image required for task. We accept only in-tree images # -- generally desktop-build or android-build -- for now. Optional("docker-image"): _by_platform( # an in-tree generated docker image (from `taskcluster/docker/<name>`) {"in-tree": text_type}, ), Optional("fetches"): { text_type: _by_platform([text_type]), }, # The set of secret names to which the task has access; these are prefixed # with `project/releng/gecko/{treeherder.kind}/level-{level}/`. Setting # this will enable any worker features required and set the task's scopes # appropriately. `true` here means ['*'], all secrets. Not supported on # Windows Optional("secrets"): _by_platform(Any(bool, [text_type])), # Information for treeherder Required("treeherder"): { # Platform to display the task on in treeherder Required("platform"): _by_platform(text_type), # Symbol to use Required("symbol"): text_type, # Tier this task is Required("tier"): _by_platform(int), }, # Extra environment values to pass to the worker Optional("env"): _by_platform({text_type: taskref_or_string}), # Max number locales per chunk Optional("locales-per-chunk"): _by_platform(int), # Task deps to chain this task with, added in transforms from primary-dependency # if this is a shippable-style build Optional("dependencies"): { text_type: text_type }, # Run the task when the listed files change (if present). Optional("when"): { "files-changed": [text_type] }, # passed through directly to the job description Optional("attributes"): job_description_schema["attributes"], Optional("extra"): job_description_schema["extra"], # Shipping product and phase Optional("shipping-product"): task_description_schema["shipping-product"], Optional("shipping-phase"): task_description_schema["shipping-phase"], })
l10n_description_schema = schema.extend({ # Name for this job, inferred from the dependent job before validation Required('name'): basestring, # build-platform, inferred from dependent job before validation Required('build-platform'): basestring, # max run time of the task Required('run-time'): _by_platform(int), # Locales not to repack for Required('ignore-locales'): _by_platform([basestring]), # All l10n jobs use mozharness Required('mozharness'): { # Script to invoke for mozharness Required('script'): _by_platform(basestring), # Config files passed to the mozharness script Required('config'): _by_platform([basestring]), # Additional paths to look for mozharness configs in. These should be # relative to the base of the source checkout Optional('config-paths'): [basestring], # Options to pass to the mozharness script Optional('options'): _by_platform([basestring]), # Action commands to provide to mozharness script Required('actions'): _by_platform([basestring]), # if true, perform a checkout of a comm-central based branch inside the # gecko checkout Required('comm-checkout', default=False): bool, }, # Items for the taskcluster index Optional('index'): { # Product to identify as in the taskcluster index Required('product'): _by_platform(basestring), # Job name to identify as in the taskcluster index Required('job-name'): _by_platform(basestring), # Type of index Optional('type'): basestring, }, # Description of the localized task Required('description'): _by_platform(basestring), Optional('run-on-projects'): job_description_schema['run-on-projects'], # worker-type to utilize Required('worker-type'): _by_platform(basestring), # File which contains the used locales Required('locales-file'): _by_platform(basestring), # Tooltool visibility required for task. Required('tooltool'): _by_platform(Any('internal', 'public')), # Docker image required for task. We accept only in-tree images # -- generally desktop-build or android-build -- for now. Required('docker-image'): _by_platform(Any( # an in-tree generated docker image (from `taskcluster/docker/<name>`) {'in-tree': basestring}, None, )), Optional('toolchains'): _by_platform([basestring]), # The set of secret names to which the task has access; these are prefixed # with `project/releng/gecko/{treeherder.kind}/level-{level}/`. Setting # this will enable any worker features required and set the task's scopes # appropriately. `true` here means ['*'], all secrets. Not supported on # Windows Required('secrets', default=False): _by_platform(Any(bool, [basestring])), # Information for treeherder Required('treeherder'): { # Platform to display the task on in treeherder Required('platform'): _by_platform(basestring), # Symbol to use Required('symbol'): basestring, # Tier this task is Required('tier'): _by_platform(int), }, # Extra environment values to pass to the worker Optional('env'): _by_platform({basestring: taskref_or_string}), # Max number locales per chunk Optional('locales-per-chunk'): _by_platform(int), # Task deps to chain this task with, added in transforms from primary-dependency # if this is a nightly Optional('dependencies'): {basestring: basestring}, # Run the task when the listed files change (if present). Optional('when'): { 'files-changed': [basestring] }, # passed through directly to the job description Optional('attributes'): job_description_schema['attributes'], Optional('extra'): job_description_schema['extra'], # Shipping product and phase Optional('shipping-product'): task_description_schema['shipping-product'], Optional('shipping-phase'): task_description_schema['shipping-phase'], })
from voluptuous import Required, Optional import logging logger = logging.getLogger(__name__) beetmover_description_schema = schema.extend({ # unique label to describe this beetmover task, defaults to {dep.label}-beetmover Required("label"): text_type, # treeherder is allowed here to override any defaults we use for beetmover. See # taskcluster/taskgraph/transforms/task.py for the schema details, and the # below transforms for defaults of various values. Optional("treeherder"): task_description_schema["treeherder"], Optional("attributes"): task_description_schema["attributes"], # locale is passed only for l10n beetmoving Optional("locale"): text_type, Required("shipping-phase"): task_description_schema["shipping-phase"], # Optional until we fix asan (run_on_projects?) Optional("shipping-product"): task_description_schema["shipping-product"], }) transforms = TransformSequence() transforms.add_validate(beetmover_description_schema) @transforms.add