Skip to content

Commit 41eebde

Browse files
authored
Merge pull request #28 from djmitche/bug1574666
Bug 1574666 - update to v1, use community-tc deployment
2 parents 18cc917 + beeb5a9 commit 41eebde

File tree

2 files changed

+130
-201
lines changed

2 files changed

+130
-201
lines changed

.taskcluster.yml

Lines changed: 130 additions & 171 deletions
Original file line numberDiff line numberDiff line change
@@ -1,172 +1,131 @@
1-
version: 0
2-
metadata:
3-
name: "taskcluster-lib-urls test"
4-
description: "Library for building taskcluster urls"
5-
owner: "{{ event.head.user.email }}"
6-
source: "{{ event.head.repo.url }}"
7-
1+
version: 1
2+
policy:
3+
pullRequests: public
84
tasks:
9-
- provisionerId: "{{ taskcluster.docker.provisionerId }}"
10-
workerType: "{{ taskcluster.docker.workerType }}"
11-
extra:
12-
github:
13-
env: true
14-
events:
15-
- pull_request.opened
16-
- pull_request.synchronize
17-
- pull_request.reopened
18-
- push
19-
payload:
20-
maxRunTime: 3600
21-
image: "node:10"
22-
command:
23-
- "/bin/bash"
24-
- "-lc"
25-
- "git clone {{event.head.repo.url}} repo && cd repo && git checkout {{event.head.sha}} && yarn install && yarn test"
26-
metadata:
27-
name: "taskcluster-lib-urls node.js test"
28-
description: "Library for building taskcluster urls"
29-
owner: "{{ event.head.user.email }}"
30-
source: "{{ event.head.repo.url }}"
31-
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
32-
workerType: '{{ taskcluster.docker.workerType }}'
33-
extra:
34-
github:
35-
events:
36-
- push
37-
branches:
38-
- master
39-
scopes:
40-
- auth:aws-s3:read-write:taskcluster-raw-docs/taskcluster-lib-urls/
41-
payload:
42-
maxRunTime: 3600
43-
image: taskcluster/upload-project-docs:latest
44-
features:
45-
taskclusterProxy:
46-
true
47-
command:
48-
- /bin/bash
49-
- '--login'
50-
- '-cx'
51-
- |
52-
git clone {{event.head.repo.url}} repo
53-
cd repo
54-
git config advice.detachedHead false
55-
git checkout {{event.head.sha}}
56-
export DEBUG=* DOCS_PROJECT=taskcluster-lib-urls DOCS_TIER=libraries DOCS_FOLDER=docs DOCS_README=README.md
57-
upload-project-docs
58-
metadata:
59-
name: "taskcluster-lib-urls docs upload"
60-
description: "Upload documentation for this project"
61-
owner: '{{ event.head.user.email }}'
62-
source: '{{ event.head.repo.url }}'
63-
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
64-
workerType: '{{ taskcluster.docker.workerType }}'
65-
extra:
66-
github:
67-
events:
68-
- pull_request.opened
69-
- pull_request.synchronize
70-
- pull_request.reopened
71-
- push
72-
payload:
73-
maxRunTime: 3600
74-
image: 'golang:1.10'
75-
command:
76-
- /bin/bash
77-
- '-c'
78-
- |
79-
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.12.3 &&
80-
mkdir -p /go/src/github.com/taskcluster/taskcluster-lib-urls
81-
cd /go/src/github.com/taskcluster/taskcluster-lib-urls
82-
git clone {{event.head.repo.url}} .
83-
git config advice.detachedHead false
84-
git checkout {{event.head.sha}}
85-
go get -v -d -t ./...
86-
go test -v -race ./...
87-
golangci-lint run
88-
metadata:
89-
name: "taskcluster-lib-urls go test"
90-
description: Run library test suite - golang 1.10
91-
owner: '{{ event.head.user.email }}'
92-
source: '{{ event.head.repo.url }}'
93-
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
94-
workerType: '{{ taskcluster.docker.workerType }}'
95-
extra:
96-
github:
97-
events:
98-
- pull_request.opened
99-
- pull_request.synchronize
100-
- pull_request.reopened
101-
- push
102-
payload:
103-
maxRunTime: 3600
104-
image: 'maven'
105-
command:
106-
- /bin/bash
107-
- '-c'
108-
- |
109-
git clone {{event.head.repo.url}} repo
110-
cd repo
111-
git config advice.detachedHead false
112-
git checkout {{event.head.sha}}
113-
mvn -X -e install
114-
metadata:
115-
name: taskcluster-lib-urls java test
116-
description: Run library test suite - java
117-
owner: '{{ event.head.user.email }}'
118-
source: '{{ event.head.repo.url }}'
119-
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
120-
workerType: '{{ taskcluster.docker.workerType }}'
121-
extra:
122-
github:
123-
events:
124-
- pull_request.opened
125-
- pull_request.synchronize
126-
- pull_request.reopened
127-
- push
128-
payload:
129-
maxRunTime: 3600
130-
image: 'python:2.7'
131-
command:
132-
- /bin/bash
133-
- '-c'
134-
- |
135-
git clone {{event.head.repo.url}} repo
136-
cd repo
137-
git config advice.detachedHead false
138-
git checkout {{event.head.sha}}
139-
pip install tox
140-
tox -e py27
141-
metadata:
142-
name: "taskcluster-lib-urls python 2.7 test"
143-
description: Run library test suite - python2.7
144-
owner: '{{ event.head.user.email }}'
145-
source: '{{ event.head.repo.url }}'
146-
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
147-
workerType: '{{ taskcluster.docker.workerType }}'
148-
extra:
149-
github:
150-
events:
151-
- pull_request.opened
152-
- pull_request.synchronize
153-
- pull_request.reopened
154-
- push
155-
payload:
156-
maxRunTime: 3600
157-
image: 'python:3.6'
158-
command:
159-
- /bin/bash
160-
- '-c'
161-
- |
162-
git clone {{event.head.repo.url}} repo
163-
cd repo
164-
git config advice.detachedHead false
165-
git checkout {{event.head.sha}}
166-
pip install tox
167-
tox -e py36
168-
metadata:
169-
name: taskcluster-lib-urls python 3.6 test
170-
description: Run library test suite - python3.6
171-
owner: '{{ event.head.user.email }}'
172-
source: '{{ event.head.repo.url }}'
5+
$let:
6+
should_run:
7+
$if: 'tasks_for == "github-pull-request"'
8+
then: {$eval: 'event["action"] in ["opened", "reopened", "synchronize"]'}
9+
else: {$eval: 'tasks_for == "github-push"'}
10+
clone_url:
11+
$if: 'tasks_for == "github-pull-request"'
12+
then: ${event.pull_request.head.repo.clone_url}
13+
else: ${event.repository.clone_url}
14+
sha:
15+
$if: 'tasks_for == "github-pull-request"'
16+
then: ${event.pull_request.head.sha}
17+
else: ${event.after}
18+
in:
19+
- $if: should_run
20+
then:
21+
provisionerId: proj-taskcluster
22+
workerType: ci
23+
deadline: {$fromNow: '1 day'}
24+
payload:
25+
maxRunTime: 3600
26+
image: "node:10"
27+
command:
28+
- "/bin/bash"
29+
- "-lc"
30+
- "git clone ${clone_url} repo && cd repo && git checkout ${sha} && yarn install && yarn test"
31+
metadata:
32+
name: "taskcluster-lib-urls node.js test"
33+
description: "Library for building taskcluster urls"
34+
35+
source: ${clone_url}
36+
- $if: should_run
37+
then:
38+
provisionerId: proj-taskcluster
39+
workerType: ci
40+
deadline: {$fromNow: '1 day'}
41+
payload:
42+
maxRunTime: 3600
43+
image: 'golang:1.10'
44+
command:
45+
- /bin/bash
46+
- '-c'
47+
- |
48+
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.12.3 &&
49+
mkdir -p /go/src/github.com/taskcluster/taskcluster-lib-urls
50+
cd /go/src/github.com/taskcluster/taskcluster-lib-urls
51+
git clone ${clone_url} repo
52+
cd repo
53+
git config advice.detachedHead false
54+
git checkout ${sha}
55+
go get -v -d -t ./...
56+
go test -v -race ./...
57+
golangci-lint run
58+
metadata:
59+
name: "taskcluster-lib-urls go test"
60+
description: Run library test suite - golang 1.10
61+
62+
source: ${clone_url}
63+
# java support is currently broken, so this never runs
64+
- $if: 'false'
65+
then:
66+
provisionerId: proj-taskcluster
67+
workerType: ci
68+
deadline: {$fromNow: '1 day'}
69+
payload:
70+
maxRunTime: 3600
71+
image: 'maven'
72+
command:
73+
- /bin/bash
74+
- '-c'
75+
- |
76+
git clone ${clone_url} repo
77+
cd repo
78+
git config advice.detachedHead false
79+
git checkout ${sha}
80+
mvn -X -e install
81+
metadata:
82+
name: taskcluster-lib-urls java test
83+
description: Run library test suite - java
84+
85+
source: ${clone_url}
86+
- $if: should_run
87+
then:
88+
provisionerId: proj-taskcluster
89+
workerType: ci
90+
deadline: {$fromNow: '1 day'}
91+
payload:
92+
maxRunTime: 3600
93+
image: 'python:2.7'
94+
command:
95+
- /bin/bash
96+
- '-c'
97+
- |
98+
git clone ${clone_url} repo
99+
cd repo
100+
git config advice.detachedHead false
101+
git checkout ${sha}
102+
pip install tox
103+
tox -e py27
104+
metadata:
105+
name: "taskcluster-lib-urls python 2.7 test"
106+
description: Run library test suite - python2.7
107+
108+
source: ${clone_url}
109+
- $if: should_run
110+
then:
111+
provisionerId: proj-taskcluster
112+
workerType: ci
113+
deadline: {$fromNow: '1 day'}
114+
payload:
115+
maxRunTime: 3600
116+
image: 'python:3.6'
117+
command:
118+
- /bin/bash
119+
- '-c'
120+
- |
121+
git clone ${clone_url} repo
122+
cd repo
123+
git config advice.detachedHead false
124+
git checkout ${sha}
125+
pip install tox
126+
tox -e py36
127+
metadata:
128+
name: taskcluster-lib-urls python 3.6 test
129+
description: Run library test suite - python3.6
130+
131+
source: ${clone_url}

.travis.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)