Bug 1333424 - Implicitly add relevant taskcluster configuration files to 'files-changed' attribute, r=dustin

This will ensure that if the taskgraph module, taskcluster configs related to a task or docker image related
to a task are modified, the task will run.

MozReview-Commit-ID: 1H6LnYsxxpc

--HG--
extra : rebase_source : 51aae8aa445be83f64d0a381cee01a0b5861b41a
This commit is contained in:
Andrew Halberstadt 2017-01-24 10:42:45 -05:00
Родитель 2458eff863
Коммит 7c0ca34fd5
3 изменённых файлов: 19 добавлений и 4 удалений

Просмотреть файл

@ -61,7 +61,6 @@ jobs:
when:
files-changed:
- "mobile/android/config/**"
- "taskcluster/docker/android-gradle-build/**"
- "testing/mozharness/configs/builds/releng_sub_android_configs/*gradle_dependencies.py"
- "**/*.gradle"

Просмотреть файл

@ -40,7 +40,6 @@ mozlint-eslint/opt:
# Other misc lint related files.
- 'python/mozlint/**'
- 'tools/lint/**'
- 'taskcluster/docker/lint/**'
mozlint-flake8/opt:
description: flake8 run over the gecko codebase
@ -66,7 +65,6 @@ mozlint-flake8/opt:
- '**/.flake8'
- 'python/mozlint/**'
- 'tools/lint/**'
- 'taskcluster/docker/lint/**'
wptlint-gecko/opt:
description: web-platform-tests linter
@ -94,4 +92,3 @@ wptlint-gecko/opt:
- 'testing/web-platform/mozilla/meta/MANIFEST.json'
- 'python/mozlint/**'
- 'tools/lint/**'
- 'taskcluster/docker/lint/**'

Просмотреть файл

@ -741,6 +741,25 @@ def add_index_routes(config, tasks):
yield task
@transforms.add
def add_files_changed(config, tasks):
for task in tasks:
if 'files-changed' not in task.get('when', {}):
yield task
continue
task['when']['files-changed'].extend([
'{}/**'.format(config.path),
'taskcluster/taskgraph/**',
])
if 'in-tree' in task['worker'].get('docker-image', {}):
task['when']['files-changed'].append('taskcluster/docker/{}/**'.format(
task['worker']['docker-image']['in-tree']))
yield task
@transforms.add
def build_task(config, tasks):
for task in tasks: