You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Factor.io a Ruby-based DSL for defining and running workflows connecting popular developer tools and services. It is designed to run from the command line, run locally without other service dependencies, very easily extensible, and workflow definitions are stored in files so they can be checked into your project repos. Workflows can run tasks on various tools and services (e.g. create a Github issue, post to Slack, make a HTTP POST call), and they can listen for events too (e.g. listen for a pattern in Slack, open a web hook, or listen for a git push on a branch in Github). Lastly, it supports great concurrency control so you can run many tasks in parallel and aggregate the results.
Install and Setup
This is a gem with a command line interface factor. To install:
gem install factor
Basic Usage
First, we need to install the dependencies (via Bundler).
Gemfile:
source "https://rubygems.org"
# Using code from Github for latest (as opposed to RubyGems).
gem 'factor', git: 'https://github.com/factor-io/factor.git'
gem 'factor-connector-web', git: 'https://github.com/factor-io/connector-web.git'
In a new project directory create a new file workflow.rb like this:
workflow.rb:
require'factor-connector-web'web_hook=run'web::hook'web_hook.on(:trigger)do |post_info|
ifpost_info[:configured]success'Configured and listening on...'successpost_info[:configured][:url]elseinfopost_infoendendweb_hook.on(:log)do |log_info|
debuglog_info[:message]endweb_hook.executeweb_hook.wait
Now run this from the command line:
bundle install
bundle exec factor w workflow.rb
Next
Workflow Syntax: Factor.io workflows can do all sorts of magic, like running in parallel, aggregating command results, defining sequences, error handling, and more.
Connectors: These are the officially support Connectors (integrations).
More examples: This repo contains a library of examples that demonstrate all the Factor.io workflow syntax capabilities as well as the officially supported Conenctors.
About
Factor Server runs your continuous deployment workflows