Codebase list capistrano / be21e00
Update upstream source from tag 'upstream/3.17.0' Update to upstream version '3.17.0' with Debian dir 14eb454fbd2a375fbad530f54b84917097ba0359 Samuel Henrique 2 years ago
12 changed file(s) with 140 addition(s) and 51 deletion(s). Raw diff Collapse all Expand all
0 version: 2.1
1
2 executors:
3 ruby:
4 parameters:
5 version:
6 description: "Ruby version number"
7 default: "3.1"
8 type: string
9 docker:
10 - image: ruby:<< parameters.version >>
11
12 commands:
13 bundle_install:
14 description: Install Ruby dependencies with Bundler
15 parameters:
16 version:
17 description: "Ruby version number"
18 default: "3.1"
19 type: string
20 steps:
21 - restore_cache:
22 keys:
23 - bundle-v1-{{ arch }}-<< parameters.version >>
24 - run:
25 name: Install Ruby Dependencies
26 command: |
27 gem install bundler --conservative --no-document || gem install bundler -v '< 2' --no-document
28 bundle config --local path vendor/bundle
29 bundle check || (bundle install --jobs=4 --retry=3 && bundle clean)
30 - save_cache:
31 paths:
32 - ./vendor/bundle
33 key: bundle-v1-{{ arch }}-<< parameters.version >>-{{ checksum "Gemfile.lock" }}
34
35 jobs:
36 danger:
37 executor: ruby
38 steps:
39 - checkout
40 - bundle_install
41 - run: bundle exec danger
42
43 rubocop:
44 executor: ruby
45 steps:
46 - checkout
47 - bundle_install
48 - run: bundle exec rubocop
49
50 spec:
51 parameters:
52 version:
53 description: "Ruby version number"
54 default: "3.1"
55 type: string
56 executor:
57 name: ruby
58 version: << parameters.version >>
59 steps:
60 - checkout
61 - bundle_install:
62 version: << parameters.version >>
63 - run: bundle exec rake spec
64
65 workflows:
66 version: 2
67 commit-workflow:
68 jobs:
69 - danger
70 - rubocop
71 - spec:
72 matrix:
73 parameters:
74 version:
75 [
76 "2.0",
77 "2.1",
78 "2.2",
79 "2.3",
80 "2.4",
81 "2.5",
82 "2.6",
83 "2.7",
84 "3.0",
85 "3.1",
86 ]
87 cron-workflow:
88 jobs:
89 - rubocop
90 - spec:
91 matrix:
92 parameters:
93 version:
94 [
95 "2.0",
96 "2.1",
97 "2.2",
98 "2.3",
99 "2.4",
100 "2.5",
101 "2.6",
102 "2.7",
103 "3.0",
104 "3.1",
105 ]
106 triggers:
107 - schedule:
108 cron: "0 13 * * 6"
109 filters:
110 branches:
111 only:
112 - master
+0
-30
.travis.yml less more
0 language: ruby
1 rvm:
2 - 3.0
3 - 2.7
4 - 2.6
5 - 2.5
6 - 2.4
7 - 2.3
8 - 2.2
9 - 2.1
10 - 2.0
11 matrix:
12 # Rubinius periodically fails in general, and it always segfaults for RuboCop
13 # in particular. Until we figure out how to make it work consistently, allow
14 # it to fail without breaking the build.
15 allow_failures:
16 - rvm: rbx-2
17 include:
18 - rvm: rbx-2
19 script: bundle exec rake spec
20 # Run Danger only once, on 2.5
21 - rvm: 2.5
22 before_script: bundle exec danger
23
24 script: bundle exec rake spec rubocop
25 install: bundle install --jobs=1
26 cache: bundler
27 branches:
28 only:
29 - master
5252
5353 ### Report failing Cucumber features!
5454
55 Currently, the Capistrano Travis build does *not* run the Cucumber suite. This means it is possible for a failing Cucumber feature to sneak in without being noticed by our continuous integration checks.
55 Currently, the Capistrano CI build does *not* run the Cucumber suite. This means it is possible for a failing Cucumber feature to sneak in without being noticed by our continuous integration checks.
5656
5757 **If you come across a failing Cucumber feature, this is a bug.** Please report it by opening a GitHub issue. Or even better: do your best to fix the feature and submit a pull request!
5858
6262
6363 * Test that your contributions pass with `rake rubocop`
6464 * Rubocop is also run as part of the full test suite with `rake`
65 * Note the Travis build will fail and your PR cannot be merged if Rubocop finds errors
65 * Note the CI build will fail and your PR cannot be merged if Rubocop finds errors
6666
6767 ## Submitting a pull request
6868
11
22 # Specify your gem's dependencies in capistrano.gemspec
33 gemspec
4
5 gem "mocha"
6 gem "rspec"
7 gem "rspec-core", "~> 3.4.4"
48
59 group :cucumber do
610 # Latest versions of cucumber don't support Ruby < 2.1
1115 gem "cucumber"
1216 end
1317 # rubocop:enable Bundler/DuplicatedGem
14 gem "rspec"
15 gem "rspec-core", "~> 3.4.4"
1618 end
1719
1820 # Latest versions of net-ssh don't support Ruby < 2.2.6
3537 gem "rake", "< 13.0.0"
3638 end
3739
38 # We only run danger once on a new-ish ruby; no need to install it otherwise
40 # We only run danger and rubocop on a new-ish ruby; no need to install them otherwise
3941 if Gem::Requirement.new("> 2.4").satisfied_by?(Gem::Version.new(RUBY_VERSION))
4042 gem "danger"
43 gem "psych", "< 4" # Ensures rubocop works on Ruby 3.1
44 gem "rubocop", "0.48.1"
4145 end
00
11 # Capistrano: A deployment automation tool built on Ruby, Rake, and SSH.
22
3 [![Gem Version](https://badge.fury.io/rb/capistrano.svg)](http://badge.fury.io/rb/capistrano) [![Build Status](https://travis-ci.org/capistrano/capistrano.svg?branch=master)](https://travis-ci.org/capistrano/capistrano) [![Code Climate](https://codeclimate.com/github/capistrano/capistrano/badges/gpa.svg)](https://codeclimate.com/github/capistrano/capistrano) [![CodersClan](https://img.shields.io/badge/get-support-blue.svg)](http://codersclan.net/?repo_id=325&source=small)
3 [![Gem Version](https://badge.fury.io/rb/capistrano.svg)](http://badge.fury.io/rb/capistrano) [![Build Status](https://circleci.com/gh/capistrano/capistrano/tree/master.svg?style=shield)](https://app.circleci.com/pipelines/github/capistrano/capistrano?branch=master) [![Code Climate](https://codeclimate.com/github/capistrano/capistrano/badges/gpa.svg)](https://codeclimate.com/github/capistrano/capistrano) [![CodersClan](https://img.shields.io/badge/get-support-blue.svg)](http://codersclan.net/?repo_id=325&source=small)
44
55 Capistrano is a framework for building automated deployment scripts. Although Capistrano itself is written in Ruby, it can easily be used to deploy projects of any language or framework, be it Rails, Java, or PHP.
66
106106
107107 ``` ruby
108108 group :development do
109 gem "capistrano", "~> 3.16", require: false
109 gem "capistrano", "~> 3.17", require: false
110110 end
111111 ```
112112
00 require "bundler/gem_tasks"
11 require "cucumber/rake/task"
22 require "rspec/core/rake_task"
3 require "rubocop/rake_task"
43
5 task default: %i(spec rubocop)
4 begin
5 require "rubocop/rake_task"
6 desc "Run RuboCop checks"
7 RuboCop::RakeTask.new
8 task default: %i(spec rubocop)
9 rescue LoadError
10 task default: :spec
11 end
12
613 RSpec::Core::RakeTask.new
7
814 Cucumber::Rake::Task.new(:features)
9
10 desc "Run RuboCop checks"
11 RuboCop::RakeTask.new
1215
1316 Rake::Task["release"].enhance do
1417 puts "Don't forget to publish the release on GitHub!"
3030 gem.add_dependency "i18n"
3131 gem.add_dependency "rake", ">= 10.0.0"
3232 gem.add_dependency "sshkit", ">= 1.9.0"
33
34 gem.add_development_dependency "mocha"
35 gem.add_development_dependency "rspec"
36 gem.add_development_dependency "rubocop", "0.48.1"
3733 end
99 WHITELIST = %i(
1010 application
1111 current_directory
12 linked_dirs
13 linked_files
1214 releases_directory
1315 repo_url
1416 repo_tree
2020 # set :pty, true
2121
2222 # Default value for :linked_files is []
23 # append :linked_files, "config/database.yml"
23 # append :linked_files, "config/database.yml", 'config/master.key'
2424
2525 # Default value for linked_dirs is []
26 # append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/system"
26 # append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "tmp/webpacker", "public/system", "vendor", "storage"
2727
2828 # Default value for default_env is {}
2929 # set :default_env, { path: "/opt/ruby/bin:$PATH" }
00 module Capistrano
1 VERSION = "3.16.0".freeze
1 VERSION = "3.17.0".freeze
22 end
55 [:app].each_with_index do |role, i|
66 config.vm.define(role, primary: true) do |primary|
77 primary.vm.define role
8 primary.vm.box = "hashicorp/precise64"
8 primary.vm.box = "hashicorp/bionic64"
99 primary.vm.network "forwarded_port", guest: 22, host: "222#{i}".to_i
1010 primary.vm.provision :shell, inline: "sudo apt-get -y install git-core"
1111
3939 FileUtils.mkdir(test_app_path)
4040
4141 File.open(gemfile, "w+") do |file|
42 file.write "source 'https://rubygems.org'\n"
4243 file.write "gem 'capistrano', path: '#{path_to_cap}'"
4344 end
4445