We started out with two apps.
- foo-staging
- foo-production
Our CI would run tests, then deploy to staging, run smoke tests and then run to production and run smoke tests.
This took about 22-25 min.
If you're seeing this error, try heroku ps:scale web=0
then import the database again and run heroku ps:scale web=1
afterwards. Found nothing on google for this error, so posting this gist with the solution that worked for me. Could have been a temporary error too.
Some notes on my Elm development environment.
The most important thing is elm-format
. It auto-formats the code when you save. You will likely miss this in other languages.
brew install elm elm-format
elm-format
language-elm
ex-mode
vim-mode-plus
Currently evaluating the elmjutsu
plugin.
require 'rubygems' | |
require 'httparty' | |
require 'nokogiri' | |
# This tool removes old builds from queues so that only the latest commit gets run. | |
# This way slow jobs won't fall behind, they will just skip commits upto the latest | |
# available commit that was successful in upstream projects. | |
class JenkinsQueueOptimizer | |
class Api | |
include HTTParty |
/* jshint asi:true */ | |
// PixiJS v4 example (WebGL rendering) | |
model = loadStateOrDefaultTo({ | |
move: 1 | |
}) | |
tick = (delta) => { | |
if(codeHasChanged()) { return } | |
Instant-feeling unit tests improves productivity and developer happiness :)
Elixir tooling isn't quite there the way Ruby can be when optimized.
Ruby benchmarks:
http://privpakportal.schenker.nu/TrackAndTrace/packageinfo.aspx?packagesurrid=69682901&inpPackageId=<SSCC NO> |
require 'socket' | |
class Graphite | |
def initialize(host) | |
@host = host | |
end | |
def socket | |
return @socket if @socket && !@socket.closed? | |
@socket = TCPSocket.new(@host, 2003) |
I'm working on something that will be way better than using jenkins to do continuous deployment, but here is how we do it today.
This is in reply to https://twitter.com/#!/haraldmartin/status/185683988063588352
What we want: For each revision, build it in steps, don't advance if the previous step failed. So that it can run a chain of steps like: unit_tests -> integration -> deploy staging -> deploy production.
If you just join projects in jenkins, and say rev-a passes in project-a, project-b might get rev-b. That's not good if project-b happens to be deploy-to-production and rev-b is broken.
We use: https://wiki.jenkins-ci.org/display/JENKINS/Join+Plugin And: https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin
require 'faye' | |
Faye::WebSocket.load_adapter('thin') | |
use Faye::RackAdapter, :mount => '/faye', :timeout => 25 | |
require ::File.expand_path('../config/environment', __FILE__) | |
run App::Application |