-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.taskcluster.yml
More file actions
49 lines (48 loc) · 1.51 KB
/
.taskcluster.yml
File metadata and controls
49 lines (48 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
version: 1
policy:
pullRequests: public
tasks:
$let:
should_run:
$if: 'tasks_for == "github-pull-request"'
then: {$eval: 'event["action"] in ["opened", "reopened", "synchronize"]'}
else: {$eval: 'tasks_for == "github-push"'}
clone_url:
$if: 'tasks_for == "github-pull-request"'
then: ${event.pull_request.head.repo.clone_url}
else: ${event.repository.clone_url}
sha:
$if: 'tasks_for == "github-pull-request"'
then: ${event.pull_request.head.sha}
else: ${event.after}
in:
- $if: should_run
then:
provisionerId: proj-taskcluster
workerType: ci
deadline: {$fromNow: '1 day'}
payload:
maxRunTime: 3600
image: "python:3.8"
command:
- /bin/bash
- '--login'
- '-c'
- >-
git clone ${clone_url} repo &&
cd repo &&
git config advice.detachedHead false &&
git checkout ${sha} &&
pip install -r requirements.txt &&
python generate.py &&
if ! output=$(git status --porcelain) || [ -n "$output" ]; then
echo "*** generate.py produced changes to the repository; these changes should be checked in ***";
git --no-pager diff;
exit 1;
fi
metadata:
name: "taskcluster-scrum generate"
description: >-
Generate initiatives and themes and validate
owner: taskcluster-internal@mozilla.com
source: ${clone_url}