Skip to content

Deploy frontend on AWS S3 #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ tasks:
else: 'dev'
else: 'dev'

bucket_channel:
# Special case for the frontend upload on AWS S3, where the production bucket is named 'prod'
$if: 'tasks_for == "github-push"'
then:
$if: 'event.ref == "refs/heads/production"'
then: 'prod'
else: ${event.ref[11:]}
else: 'dev'

taskboot_image: "mozilla/taskboot:0.1.9"
in:
- taskId: {$eval: as_slugid("bot_check_lint")}
Expand Down Expand Up @@ -342,3 +351,35 @@ tasks:
description: Update Taskcluster hook triggering the code-coverage tasks
owner: [email protected]
source: https://github.com/mozilla/code-coverage

- $if: 'channel in ["testing", "production"]'
then:
taskId: {$eval: as_slugid("frontend_deploy")}
created: {$fromNow: ''}
deadline: {$fromNow: '1 hour'}
provisionerId: aws-provisioner-v1
workerType: github-worker
dependencies:
- {$eval: as_slugid("frontend_build")}
payload:
features:
# Needed for access to secret
taskclusterProxy: true
maxRunTime: 3600
image: "${taskboot_image}"
env:
TASKCLUSTER_SECRET: "project/relman/code-coverage/deploy-${channel}"
command:
- taskboot
- deploy-s3
- --artifact-folder
- public/frontend
- --bucket
- "codecoverage-${bucket_channel}-site-static-website"
scopes:
- "secrets:get:project/relman/code-coverage/deploy-${channel}"
metadata:
name: "Code Coverage Frontend deploy (${channel})"
description: Deploy frontend build on environment
owner: [email protected]
source: https://github.com/mozilla/code-coverage