2019-04-09 19:11:47 +03:00
|
|
|
version: 1
|
|
|
|
policy:
|
|
|
|
pullRequests: public
|
|
|
|
tasks:
|
|
|
|
$let:
|
|
|
|
decision_task_id: {$eval: as_slugid("decision_task")}
|
|
|
|
expires_in: {$fromNow: '1 year'}
|
|
|
|
user: ${event.sender.login}
|
|
|
|
|
|
|
|
head_branch:
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
then: ${event.pull_request.head.ref}
|
|
|
|
else:
|
|
|
|
$if: 'tasks_for == "github-push"'
|
|
|
|
then: ${event.ref}
|
|
|
|
else: ${event.release.target_commitish}
|
|
|
|
|
|
|
|
head_rev:
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
then: ${event.pull_request.head.sha}
|
|
|
|
else:
|
|
|
|
$if: 'tasks_for == "github-push"'
|
|
|
|
then: ${event.after}
|
|
|
|
else: ${event.release.tag_name}
|
|
|
|
|
|
|
|
repository:
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
then: ${event.pull_request.head.repo.html_url}
|
|
|
|
else: ${event.repository.html_url}
|
|
|
|
in:
|
2019-04-09 23:51:54 +03:00
|
|
|
$if: 'tasks_for in ["github-pull-request", "github-push"]'
|
|
|
|
then:
|
|
|
|
- taskId: {$eval: as_slugid("lint_task")}
|
2019-04-09 19:11:47 +03:00
|
|
|
created: {$fromNow: ''}
|
|
|
|
deadline: {$fromNow: '1 hour'}
|
|
|
|
provisionerId: aws-provisioner-v1
|
|
|
|
workerType: github-worker
|
|
|
|
payload:
|
|
|
|
maxRunTime: 3600
|
|
|
|
image: python
|
|
|
|
command:
|
|
|
|
- "/bin/bash"
|
2019-04-09 23:51:54 +03:00
|
|
|
- "-lcx"
|
2019-04-09 19:11:47 +03:00
|
|
|
- "git clone ${repository} &&
|
|
|
|
cd bugbug &&
|
|
|
|
git checkout ${head_rev} &&
|
|
|
|
pip install -r test-requirements.txt &&
|
2019-04-18 13:49:00 +03:00
|
|
|
flake8"
|
2019-04-09 23:51:54 +03:00
|
|
|
metadata:
|
|
|
|
name: bugbug lint
|
|
|
|
description: bugbug lint
|
|
|
|
owner: ${user}@users.noreply.github.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
2019-04-18 13:49:00 +03:00
|
|
|
- $if: 'tasks_for == "github-push"'
|
|
|
|
then:
|
|
|
|
taskId: {$eval: as_slugid("version_check_task")}
|
|
|
|
created: {$fromNow: ''}
|
|
|
|
deadline: {$fromNow: '1 hour'}
|
|
|
|
provisionerId: aws-provisioner-v1
|
|
|
|
workerType: github-worker
|
|
|
|
payload:
|
|
|
|
maxRunTime: 3600
|
|
|
|
image: python
|
|
|
|
command:
|
|
|
|
- "/bin/bash"
|
|
|
|
- "-lcx"
|
|
|
|
- "git clone ${repository} &&
|
|
|
|
cd bugbug &&
|
|
|
|
git checkout ${head_rev} &&
|
|
|
|
python infra/version_check.py"
|
|
|
|
metadata:
|
|
|
|
name: bugbug tag version check
|
|
|
|
description: bugbug tag version check
|
|
|
|
owner: ${user}@users.noreply.github.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
2019-04-09 23:51:54 +03:00
|
|
|
- taskId: {$eval: as_slugid("tests_task")}
|
|
|
|
created: {$fromNow: ''}
|
|
|
|
deadline: {$fromNow: '1 hour'}
|
|
|
|
provisionerId: aws-provisioner-v1
|
|
|
|
workerType: github-worker
|
|
|
|
payload:
|
|
|
|
maxRunTime: 3600
|
|
|
|
image: python
|
|
|
|
command:
|
|
|
|
- "/bin/bash"
|
|
|
|
- "-lcx"
|
|
|
|
- "git clone ${repository} &&
|
|
|
|
cd bugbug &&
|
|
|
|
git checkout ${head_rev} &&
|
|
|
|
pip install -r requirements.txt &&
|
|
|
|
pip install -r test-requirements.txt &&
|
|
|
|
python -m pytest tests/test_*.py"
|
2019-04-09 19:11:47 +03:00
|
|
|
metadata:
|
|
|
|
name: bugbug tests
|
|
|
|
description: bugbug tests
|
|
|
|
owner: ${user}@users.noreply.github.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
2019-04-09 23:51:54 +03:00
|
|
|
|
|
|
|
- taskId: {$eval: as_slugid("rollback_test_task")}
|
|
|
|
created: {$fromNow: ''}
|
|
|
|
deadline: {$fromNow: '1 hour'}
|
|
|
|
provisionerId: aws-provisioner-v1
|
|
|
|
workerType: github-worker
|
|
|
|
payload:
|
|
|
|
maxRunTime: 3600
|
|
|
|
image: python
|
|
|
|
command:
|
|
|
|
- "/bin/bash"
|
|
|
|
- "-lcx"
|
|
|
|
- "git clone ${repository} &&
|
|
|
|
cd bugbug &&
|
|
|
|
git checkout ${head_rev} &&
|
|
|
|
pip install -r requirements.txt &&
|
|
|
|
python -c 'from bugbug import bugzilla, db; db.download()' &&
|
|
|
|
python -m bugbug.bug_snapshot"
|
|
|
|
metadata:
|
|
|
|
name: bugbug rollback test
|
|
|
|
description: bugbug rollback test
|
|
|
|
owner: ${user}@users.noreply.github.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
|
|
|
- taskId: {$eval: as_slugid("packaging_test_task")}
|
|
|
|
created: {$fromNow: ''}
|
|
|
|
deadline: {$fromNow: '1 hour'}
|
|
|
|
provisionerId: aws-provisioner-v1
|
|
|
|
workerType: github-worker
|
|
|
|
payload:
|
|
|
|
maxRunTime: 3600
|
|
|
|
image: python
|
|
|
|
command:
|
|
|
|
- "/bin/bash"
|
|
|
|
- "-lcx"
|
|
|
|
- "git clone ${repository} &&
|
|
|
|
cd bugbug &&
|
|
|
|
git checkout ${head_rev} &&
|
|
|
|
pip install -r requirements.txt &&
|
|
|
|
python setup.py sdist &&
|
|
|
|
pip install dist/bugbug-$(cat VERSION).tar.gz"
|
|
|
|
metadata:
|
|
|
|
name: bugbug packaging test
|
|
|
|
description: bugbug packaging test
|
|
|
|
owner: ${user}@users.noreply.github.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
2019-04-10 11:54:30 +03:00
|
|
|
|
2019-04-11 15:00:18 +03:00
|
|
|
- taskId: {$eval: as_slugid("docker_build")}
|
|
|
|
created: {$fromNow: ''}
|
|
|
|
deadline: {$fromNow: '1 hour'}
|
|
|
|
provisionerId: aws-provisioner-v1
|
|
|
|
workerType: releng-svc
|
|
|
|
payload:
|
|
|
|
capabilities:
|
|
|
|
privileged: true
|
|
|
|
maxRunTime: 3600
|
2019-04-17 14:24:46 +03:00
|
|
|
image: mozilla/taskboot:latest
|
2019-04-11 15:00:18 +03:00
|
|
|
command:
|
2019-04-15 18:36:30 +03:00
|
|
|
- "/bin/sh"
|
|
|
|
- "-lcxe"
|
|
|
|
- "git clone ${repository} /code &&
|
|
|
|
cd /code &&
|
|
|
|
git checkout ${head_rev} &&
|
|
|
|
python http_service/download_models.py &&
|
|
|
|
taskboot --target /code build-compose --write /images"
|
2019-04-11 15:00:18 +03:00
|
|
|
artifacts:
|
2019-04-15 18:36:30 +03:00
|
|
|
public/bugbug:
|
2019-04-11 15:00:18 +03:00
|
|
|
expires: {$fromNow: '2 weeks'}
|
2019-04-15 18:36:30 +03:00
|
|
|
path: /images
|
|
|
|
type: directory
|
2019-04-11 15:00:18 +03:00
|
|
|
scopes:
|
|
|
|
- docker-worker:capability:privileged
|
|
|
|
metadata:
|
|
|
|
name: bugbug docker build
|
|
|
|
description: bugbug docker build
|
|
|
|
owner: ${user}@users.noreply.github.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
2019-04-10 11:54:30 +03:00
|
|
|
- $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
|
|
|
|
then:
|
|
|
|
dependencies:
|
|
|
|
- {$eval: as_slugid("lint_task")}
|
|
|
|
- {$eval: as_slugid("tests_task")}
|
|
|
|
- {$eval: as_slugid("rollback_test_task")}
|
|
|
|
- {$eval: as_slugid("packaging_test_task")}
|
2019-04-18 13:49:00 +03:00
|
|
|
- {$eval: as_slugid("version_check_task")}
|
2019-04-10 11:54:30 +03:00
|
|
|
scopes:
|
|
|
|
- secrets:get:project/relman/bugbug/deploy
|
|
|
|
created: {$fromNow: ''}
|
|
|
|
deadline: {$fromNow: '1 hour'}
|
|
|
|
provisionerId: aws-provisioner-v1
|
|
|
|
workerType: github-worker
|
|
|
|
payload:
|
|
|
|
features:
|
|
|
|
taskclusterProxy:
|
|
|
|
true
|
|
|
|
maxRunTime: 3600
|
|
|
|
image: python
|
|
|
|
command:
|
|
|
|
- "/bin/bash"
|
|
|
|
- "-lcx"
|
|
|
|
- "git clone ${repository} &&
|
|
|
|
cd bugbug &&
|
|
|
|
git checkout ${head_rev} &&
|
|
|
|
python setup.py sdist bdist_wheel &&
|
|
|
|
pip install twine &&
|
|
|
|
python infra/pypi.py"
|
|
|
|
metadata:
|
|
|
|
name: bugbug PyPI release
|
|
|
|
description: bugbug PyPI release
|
|
|
|
owner: ${user}@users.noreply.github.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|