Skip to content

Instantly share code, notes, and snippets.

@skierkowski
Created August 12, 2014 23:46
Show Gist options
  • Save skierkowski/aecb4df6c1faed43d429 to your computer and use it in GitHub Desktop.
Save skierkowski/aecb4df6c1faed43d429 to your computer and use it in GitHub Desktop.
Intro test

What is Factor.io?

Factor.io is a simple way to automate developer workflows by defining them programmatically using the Factor.io syntax and running them using the Factor Server.

Show me, don't tell me!

Suppose you use Github for source code management, and Heroku for hosting. When you merge code into the master branch of the skierkowski/hello repo it is ready for deployment to Heroku's 'hello' app. We want the deployment to happen automatically.

This workflow can now be described using the Factor.io syntax like this:

listen 'github::push', repo:'skierkowski/hello#master' do |repo|
  run 'heroku::deploy', content:repo.content, app:'hello' do |deploy|
    success "Deploy complete, revisision \#{deploy.revision}"
  end
end

Now you just have to start the Factor.io server and this workflow comes to life. The Factor.io Server will now just sit and listen for new code being merged or pushed to the skierkowski/hello master branch. When the push occurs, it will then deploy the contents to Heroku and notify us of the new revision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment