Add a Taskcluster hook to generate the past bugs by function data

Second part of #1133
This commit is contained in:
Marco Castelluccio 2019-12-11 11:19:22 +01:00
Родитель 3d88eb8299
Коммит a9e7adcb7b
3 изменённых файлов: 99 добавлений и 0 удалений

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

@ -378,6 +378,40 @@ tasks:
owner: mcastelluccio@mozilla.com
source: ${repository}/raw/${head_rev}/.taskcluster.yml
- $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
then:
taskId: {$eval: as_slugid("update_hook_past_bugs_by_function_pipeline")}
dependencies:
- {$eval: as_slugid("docker_push")}
scopes:
- hooks:modify-hook:project-relman/bugbug-past-bugs-by-function
- assume:hook-id:project-relman/bugbug-past-bugs-by-function
created: {$fromNow: ''}
deadline: {$fromNow: '5 hours'}
provisionerId: proj-relman
workerType: ci
payload:
features:
taskclusterProxy:
true
maxRunTime: 3600
image: "${taskboot_image}"
env:
VERSION: {$eval: 'head_branch[10:]'}
command:
- "/bin/sh"
- "-lcxe"
- "git clone --quiet ${repository} &&
cd bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
python infra/set_hook_version.py $VERSION infra/taskcluster-hook-past-bugs-by-function.json &&
taskboot --target . build-hook infra/taskcluster-hook-past-bugs-by-function.json project-relman bugbug-past-bugs-by-function"
metadata:
name: bugbug update past bugs by function hook
description: bugbug update past bugs by function hook
owner: mcastelluccio@mozilla.com
source: ${repository}/raw/${head_rev}/.taskcluster.yml
- $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
then:
taskId: {$eval: as_slugid("update_hook_classify_patch")}

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

@ -0,0 +1,64 @@
{
"schedule": [
"0 0 0 * * *"
],
"metadata": {
"description": "",
"name": "BugBug past bugs by function pipeline",
"owner": "mcastelluccio@mozilla.com"
},
"task": {
"created": {
"$fromNow": "0 seconds"
},
"deadline": {
"$fromNow": "2 hours"
},
"expires": {
"$fromNow": "1 month"
},
"extra": {},
"metadata": {
"description": "",
"name": "BugBug past bugs by function pipeline",
"owner": "mcastelluccio@mozilla.com",
"source": "https://github.com/mozilla/bugbug"
},
"payload": {
"artifacts": {
"public/past_bugs_by_function.pickle.zst": {
"path": "/past_bugs_by_function.pickle.zst",
"type": "file"
}
},
"cache": {},
"capabilities": {},
"env": {},
"features": {
"taskclusterProxy": true
},
"command": [
"bugbug-past-bugs-by-function"
],
"image": "mozilla/bugbug",
"maxRunTime": 7200
},
"priority": "normal",
"provisionerId": "proj-relman",
"retries": 5,
"routes": [
"notify.email.release-mgmt-analysis@mozilla.com.on-failed",
"notify.irc-channel.#bugbug.on-failed"
],
"schedulerId": "-",
"scopes": [
"assume:hook-id:project-relman/bugbug-past-bugs-by-function"
],
"tags": {},
"workerType": "ci"
},
"triggerSchema": {
"additionalProperties": false,
"type": "object"
}
}

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

@ -20,6 +20,7 @@ parameters = [
(os.path.realpath("infra/taskcluster-hook-annotate.json"), {}),
(os.path.realpath("infra/taskcluster-hook-pipeline-start.json"), {}),
(os.path.realpath("infra/taskcluster-hook-check-models-start.json"), {}),
(os.path.realpath("infra/taskcluster-hook-past-bugs-by-function.json"), {}),
(os.path.realpath("infra/taskcluster-hook-classify-patch.json"), {"DIFF_ID": 123}),
(os.path.realpath("infra/taskcluster-hook-test-select.json"), {"DIFF_ID": 123}),
]