Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Tapjoy/s3d

 
 

Repository files navigation

Image creds to Moto "Club4AG" Miwa via Flickr

Deploy to S3

Precheck, deploy, and verify S3 Assets.

Consistent, source-controlled asset deployments. Consolidates deploy code between apps.

Precheck
----------

Correct upload target (bucket)
Correct path
Correct AWS creds
Assert clean working directory


Deploy
----------

To s3

Display CDN statuses

Use

# any of ..

s3d .s3.production
s3d .s3.staging
s3d .s3.local

passing in custom author name to create meaningful sub directories in your uploaded files

if no author is set $author will be result of $whoami

s3d -e author=sam.smith .s3.staging

Install

This will make a copy of this repo in your home directory and symlink it

make install

To symlink this repo directly

ln -s pwd/s3d /usr/local/bin

Uninstall

make uninstall

Config

.s3.production

{

  "upload": {
    "dir": "build"
  },

  "aws": {
    "account": "my-prod-user",
    "keyfile": ".aws.prodkeys" // ** see details below
  },

  "bucket": {
    "name": "name.of.my.bucket",
    "path": "/project/$git_tag-$git_sha1/$author",
    "options" "--cache-control max-age=2592000,public"
  },

  "cdns": {
    "cloudfront": "https://b33fgotm11k.cloudfront.net",
    "akamai": "https://e9474.b.akamaiedge.net"

    // etc ..

  }

}

path : The path can include $git_tag and $git_sha1. The corresponding values will be substituted in by s3d. ** aws.keyfile: Optional file to source AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from.

License

Copyright 2015 Will O'Brien

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Deploy front-end apps to s3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 69.5%
  • Shell 28.5%
  • Makefile 2.0%