Skip to content

Commit

Permalink
configure for AlmaLinux deploy (HOURS-126)
Browse files Browse the repository at this point in the history
- ruby 3.2
- test against node 14 and 16
- update capybara and pull in matrix (removed from ruby 3 core)
- update pry and mysql2
- update deploy targets and service user
  • Loading branch information
barmintor committed Dec 14, 2023
1 parent bf30d4b commit a1744f1
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0.3']
node: ['8', '12']
ruby-version: ['3.2.2']
node: ['14', '16']
env:
RAILS_ENV: test
MYSQL_HOST: 127.0.0.1
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ gem 'sass', '~> 3.7.4'
gem 'sass-rails', '~> 5'
gem "sprockets-rails"
gem "net-ldap", '~> 0.17.1'
gem 'nokogiri', '~> 1.10.10'
gem 'nokogiri', '~> 1.15.2' # update past 1.10 requires alma
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
Expand All @@ -38,7 +38,7 @@ group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 3.33'
gem 'capybara', '~> 3.39'
# For testing with chromedriver
gem 'selenium-webdriver', '~> 4.0'
gem 'rexml', '~> 3.2', '>= 3.2.4'
Expand Down
32 changes: 18 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,16 @@ GEM
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
capybara (3.33.0)
capybara (3.39.2)
addressable
matrix
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
coderay (1.1.2)
coderay (1.1.3)
concurrent-ruby (1.2.2)
crass (1.0.6)
cul_omniauth (0.8.0)
Expand Down Expand Up @@ -159,13 +160,14 @@ GEM
net-pop
net-smtp
marcel (1.0.2)
method_source (0.9.2)
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.4.0)
mini_portile2 (2.8.5)
minitest (5.18.0)
msgpack (1.4.5)
multi_json (1.13.1)
mysql2 (0.5.2)
mysql2 (0.5.5)
net-imap (0.3.4)
date
net-protocol
Expand All @@ -180,8 +182,9 @@ GEM
net-protocol
net-ssh (5.2.0)
nio4r (2.5.9)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
nokogiri (1.15.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
omniauth (1.9.2)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
Expand All @@ -190,12 +193,13 @@ GEM
nokogiri (~> 1.5)
omniauth (~> 1.2)
orm_adapter (0.5.0)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (5.0.1)
puma (5.2.0)
nio4r (~> 2.0)
racc (1.7.3)
rack (2.2.7)
rack-test (2.1.0)
rack (>= 1.3)
Expand Down Expand Up @@ -229,7 +233,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (1.8.2)
regexp_parser (2.8.3)
responders (3.1.0)
actionpack (>= 5.2)
railties (>= 5.2)
Expand Down Expand Up @@ -328,7 +332,7 @@ DEPENDENCIES
capistrano-passenger (~> 0.1)
capistrano-rails (~> 1.2)
capistrano-rvm (~> 0.1)
capybara (~> 3.33)
capybara (~> 3.39)
cul-ldap!
cul_omniauth (~> 0.8.0)
database_cleaner
Expand All @@ -339,7 +343,7 @@ DEPENDENCIES
listen (~> 3.2)
mysql2
net-ldap (~> 0.17.1)
nokogiri (~> 1.10.10)
nokogiri (~> 1.15.2)
pry
puma (~> 5.2)
rails (~> 7.0.0)
Expand Down
7 changes: 4 additions & 3 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
set :department, 'ldpd'
set :instance, fetch(:department)
set :application, 'hours'
set :repo_name, "#{fetch(:department)}-#{fetch(:application)}"
set :repo_name, "ldpd-hours"
set :deploy_name, "#{fetch(:application)}_#{fetch(:stage)}"
# used to run rake db:migrate, etc
# Default value for :rails_env is fetch(:stage)
set :rails_env, fetch(:deploy_name)
# use the rvm wrapper
set :rvm_custom_path, '~/.rvm-alma8'
set :rvm_ruby_version, fetch(:deploy_name)

set :repo_url, "[email protected]:cul/#{fetch(:repo_name)}.git"

set :remote_user, "#{fetch(:instance)}serv"
set :remote_user, "renserv"

# Default deploy_to directory is /var/www/:application
set :deploy_to, "/opt/passenger/#{fetch(:instance)}/#{fetch(:deploy_name)}"
set :deploy_to, "/opt/passenger/#{fetch(:deploy_name)}"

# Default value for :log_level is :debug
set :log_level, :info
Expand Down
2 changes: 1 addition & 1 deletion config/deploy/dev.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
server 'all-nginx-dev1.cul.columbia.edu', user: fetch(:remote_user), roles: %w(app db web)
server 'diglib-rails-dev1.cul.columbia.edu', user: fetch(:remote_user), roles: %w(app db web)
# Current branch is suggested by default in development
ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
2 changes: 1 addition & 1 deletion config/deploy/prod.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
server "ldpd-nginx-#{fetch(:stage)}1.cul.columbia.edu", user: fetch(:remote_user), roles: %w(app db web)
server "diglib-rails-prod1.cul.columbia.edu", user: fetch(:remote_user), roles: %w(app db web)
# In test/prod, deploy from release tags; most recent version is default
ask :branch, proc { `git tag --sort=version:refname`.split("\n").last }
2 changes: 1 addition & 1 deletion config/deploy/test.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
server 'ldpd-nginx-test1.cul.columbia.edu', user: fetch(:remote_user), roles: %w(app db web)
server 'diglib-rails-test1.cul.columbia.edu', user: fetch(:remote_user), roles: %w(app db web)
# Current branch is suggested by default in development
ask :branch, proc { `git tag --sort=version:refname`.split("\n").last }

0 comments on commit a1744f1

Please sign in to comment.