Skip to content

Commit 511c240

Browse files
authored
Deploy frontend on AWS S3 (#96)
1 parent 5e106b5 commit 511c240

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.taskcluster.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ tasks:
3232
else: 'dev'
3333
else: 'dev'
3434

35+
bucket_channel:
36+
# Special case for the frontend upload on AWS S3, where the production bucket is named 'prod'
37+
$if: 'tasks_for == "github-push"'
38+
then:
39+
$if: 'event.ref == "refs/heads/production"'
40+
then: 'prod'
41+
else: ${event.ref[11:]}
42+
else: 'dev'
43+
3544
taskboot_image: "mozilla/taskboot:0.1.9"
3645
in:
3746
- taskId: {$eval: as_slugid("bot_check_lint")}
@@ -342,3 +351,35 @@ tasks:
342351
description: Update Taskcluster hook triggering the code-coverage tasks
343352
344353
source: https://github.com/mozilla/code-coverage
354+
355+
- $if: 'channel in ["testing", "production"]'
356+
then:
357+
taskId: {$eval: as_slugid("frontend_deploy")}
358+
created: {$fromNow: ''}
359+
deadline: {$fromNow: '1 hour'}
360+
provisionerId: aws-provisioner-v1
361+
workerType: github-worker
362+
dependencies:
363+
- {$eval: as_slugid("frontend_build")}
364+
payload:
365+
features:
366+
# Needed for access to secret
367+
taskclusterProxy: true
368+
maxRunTime: 3600
369+
image: "${taskboot_image}"
370+
env:
371+
TASKCLUSTER_SECRET: "project/relman/code-coverage/deploy-${channel}"
372+
command:
373+
- taskboot
374+
- deploy-s3
375+
- --artifact-folder
376+
- public/frontend
377+
- --bucket
378+
- "codecoverage-${bucket_channel}-site-static-website"
379+
scopes:
380+
- "secrets:get:project/relman/code-coverage/deploy-${channel}"
381+
metadata:
382+
name: "Code Coverage Frontend deploy (${channel})"
383+
description: Deploy frontend build on environment
384+
385+
source: https://github.com/mozilla/code-coverage

0 commit comments

Comments
 (0)