View dockbit-pipeline.sh
npm run-script deploy:activate production -- --revision `git rev-parse --short HEAD`
curl https://api.rollbar.com/api/1/deploy/ -F access_token=token -F environment=production -F revision=`git log -n 1 --pretty=format:"%H"` -F local_username=$DOCKBIT_DEPLOYMENT_CREATOR
View slack-notification.sh
message="New tag in production, https://dashboard.envoy.com/index.html:`git rev-parse --short HEAD`"
payload="payload={\"text\": \"$message\", \"channel\": \"#garaje\"}"
curl -X POST --data-urlencode "$payload" https://hooks.slack.com/services/foo-token/bar-token/baz-token
View travis_deploy.sh
#!/bin/bash
if [ "$TRAVIS_BRANCH" == "master" ]; then
ember deploy staging
ember deploy production
ember deploy:activate staging -r `git rev-parse --short HEAD`
else
./deploy-to-staging.rb
fi
View travis_deploy.sh
ember deploy staging
if [ "$TRAVIS_BRANCH" == "master" ]; then
ember deploy production
fi
View deploy.js
/* jshint node: true */
require('dotenv').config({ silent: true });
module.exports = function(deployTarget) {
var ENV = {
build: {}
};
/*
This tells ember-cli-deploy-s3-index how to name the index file.
View plugins.js
import Ember from 'ember';
export default Ember.Route.extend({
plugins: Ember.inject.service(),
model(params) {
/*
I'm assuming the plugin service have a method called mount
which "mounts" a plugin. This method returns a promise... Ember
won't move out of the model hook.
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
enumerableProperties: Ember.computed(function() {
let list = [];
for (var x in [1,2,3,4,5]) {
list.push(x);
}
View deploy-to-staging.rb
#!/usr/bin/env ruby
require 'net/http'
require 'json'
def create_deployment(sha)
uri = URI('https://api.github.com/repos/envoy/garaje/deployments')
req = Net::HTTP::Post.new(uri.path, {
'Content-Type' => 'application/json',
'Authorization' => "token #{ENV['GITHOUT_OAUTH_TOKEN']}"
View Dockerfile
FROM ubuntu:latest
RUN apt-get -y update
RUN apt-get upgrade --yes && apt-get install -y git && apt-get install -y curl
RUN apt-get -y install sudo
RUN apt-get -y install nodejs npm libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ ffmpeg libgroove-dev zlib1g-dev libpng-dev
RUN apt-get -y install redis-server
RUN ln -s `which nodejs` /usr/bin/node
RUN npm install -g n
View .travis.yml
sudo: required
services:
- docker
language: node_js
node_js:
- "5.0.0"
cache: