This repository has been archived by the owner on Oct 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.taskcluster.yml
68 lines (68 loc) · 2.24 KB
/
.taskcluster.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
version: 1
policy:
pullRequests: collaborators
tasks:
$let:
head_rev:
$if: tasks_for == "github-pull-request"
then: ${event.pull_request.head.sha}
else: ${event.after}
repository:
$if: tasks_for == "github-pull-request"
then: ${event.pull_request.head.repo.html_url}
else: ${event.repository.html_url}
in:
$match:
(tasks_for == "github-push"):
taskId:
$eval: as_slugid("decision")
deadline:
$fromNow: 1 day
provisionerId: relops-3
workerType: decision-gcp
routes:
- index.project.relops.${event.repository.name}.decision.revision.${event.after}
- index.project.relops.${event.repository.name}.decision.latest
scopes:
- assume:repo:github.com/${event.organization.login}/${event.repository.name}:branch:${event.repository.default_branch}
- queue:scheduler-id:taskcluster-github
extra:
github:
env: true
data:
base:
sha: ${event.before}
user:
login: ${event.sender.login}
head:
sha: ${event.after}
user:
email: ${event.pusher.email}
metadata:
name: '00 :: create image deployment tasks'
description: |+
determine which resources should be deployed and
trigger appropriate deployment tasks for the same
owner: ${event.pusher.email}
source: ${event.repository.html_url}
payload:
maxRunTime: 600
image: python:latest
features:
taskclusterProxy: true
env:
GITHUB_HEAD_SHA: ${event.after}
command:
- /bin/bash
- '--login'
- '-c'
- >-
git clone --quiet ${event.repository.clone_url}
&& cd ${event.repository.name}
&& git fetch
&& git checkout ${head_rev}
&& git reset --hard ${event.after}
&& python -m pip install --upgrade pip | grep -v "^[[:space:]]*$"
&& pip install -r ci/requirements.txt | grep -v "^[[:space:]]*$"
&& python ci/cloud-image-deploy.py