Created
September 21, 2015 10:12
-
-
Save soramugi/6430f2e57486af242a77 to your computer and use it in GitHub Desktop.
hubotを家jenkinsで良い感じする奴
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load DSL and set up stages | |
require 'capistrano/setup' | |
# Include default deployment tasks | |
require 'capistrano/deploy' | |
# Include tasks from other gems included in your Gemfile | |
# | |
# For documentation on these, see for example: | |
# | |
# https://github.com/capistrano/rvm | |
# https://github.com/capistrano/rbenv | |
# https://github.com/capistrano/chruby | |
# https://github.com/capistrano/bundler | |
# https://github.com/capistrano/rails | |
# https://github.com/capistrano/passenger | |
# | |
# require 'capistrano/rvm' | |
require 'capistrano/rbenv' | |
# require 'capistrano/chruby' | |
require 'capistrano/bundler' | |
# require 'capistrano/rails/assets' | |
# require 'capistrano/rails/migrations' | |
# require 'capistrano/passenger' | |
require 'capistrano/foreman' | |
require 'capistrano/npm' | |
# Load custom tasks from `lib/capistrano/tasks` if you have any defined | |
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config valid only for current version of Capistrano | |
lock '3.4.0' | |
set :application, 'owl' | |
set :deploy_to, ->{ "/home/pi/#{fetch(:application)}" } | |
set :foreman_env, ->{ "#{fetch(:deploy_to)}/shared/.env" } | |
set :scm, :copy | |
set :bundle_binstubs, -> { shared_path.join('bin') } | |
set :rbenv_type, :system | |
set :rbenv_ruby, '2.2.1' | |
set :pty, true | |
set :exclude_dir, %w| | |
vendor | |
.git/ | |
.bundle/ | |
node_modules/ | |
| | |
set :linked_dirs, %w{ | |
node_modules | |
vendor/bundle | |
} | |
set :linked_files, %w{ | |
.env | |
} | |
after 'foreman:export', 'foreman:restart' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'foreman' | |
gem 'capistrano' | |
gem 'capistrano-rbenv' | |
gem 'capistrano-bundler' | |
gem 'capistrano-scm-copy' | |
gem 'capistrano3-foreman' | |
gem 'capistrano-npm' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :stage, :production | |
server 'jenkins.local', | |
user: 'pi', | |
port: 22, | |
roles: %w{web app db}, | |
ssh_options: { | |
keys: %w(~/.ssh/id_rsa), | |
forward_agent: true, | |
auth_methods: %w(publickey) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment