Automatically stage a local directory based on Github pull request.
For non-Ruby versions, see Ports below.
Build status for master branch:
Add this line to your application's Gemfile:
gem 'puppet-autostager'
And then execute:
$ bundle
Or install it yourself as:
$ gem install puppet-autostager
Create an access token as described at https://github.com/octokit/octokit.rb#oauth-access-tokens then export a few environment variables:
export repo_slug=ISEexchange/puppet
export access_token=<your 40-char token>
export base_dir=/tmp/puppet/environments
export debug=anything
# Set a timeout for git operations (default 120 seconds).
export timeout=180
# Override the default 30 second interval.
export sleep_interval=60
# Or run as a single-shot operation.
export sleep_interval=0
# Set an alternate git server (default: github.com)
export git_server=git.example.com
export OCTOKIT_API_ENDPOINT=https://git.example.com/api/v3/
Then run:
autostager
We use CircleCI to build and publish to rubygems.org:
If build is clean on master branch, CircleCI pushes the built gem to https://rubygems.org/gems/puppet-autostager.