Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New deploy config #2531

Merged
merged 24 commits into from Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions .circleci/config.yml
Expand Up @@ -282,9 +282,9 @@ workflows:
commit:
jobs:
- build
# - deploy_production:
# requires:
# - build
# filters:
# branches:
# only: main
- deploy_production:
requires:
- build
filters:
branches:
only: main
9 changes: 2 additions & 7 deletions .cloud66/deploy_hooks.yml
@@ -1,7 +1,7 @@
production:
# Install postgres 13 client, to be enable db:structure:load
# Install postgres (to enable db:structure:load) and ripgrep
first_thing:
- command: sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - && sudo apt-get update && sudo apt-get -y install postgresql-13
- command: sudo apt-get -y install postgresql-client-common ripgrep
target: rails
sudo: true
apply_during: build_only
Expand All @@ -19,11 +19,6 @@ production:
sudo: true

after_rails:
# Add ripgrep
- command: sudo apt-get install ripgrep
target: rails
run_on: all_servers
sudo: true
# Make papertrail connected
- source: /.cloud66/log_files.yml
destination: /etc/log_files.yml
Expand Down
2 changes: 1 addition & 1 deletion .cloud66/manifest.yml
@@ -1,7 +1,7 @@
production:
postgresql:
configuration:
version: 13
version: 16
rails:
configuration:
node_version: "16.20.1"
2 changes: 1 addition & 1 deletion Gemfile.lock
Expand Up @@ -490,7 +490,7 @@ GEM
parser (3.2.2.4)
ast (~> 2.4.1)
racc
pg (1.5.4)
pg (1.5.6)
pg_search (2.3.6)
activerecord (>= 5.2)
activesupport (>= 5.2)
Expand Down
7 changes: 3 additions & 4 deletions config/database.yml
Expand Up @@ -38,24 +38,23 @@ test:
production:
primary:
<<: *default
database: bike_index_production
host: "<%= ENV['POSTGRESQL_ADDRESS'] %>"
database: "<%= ENV['POSTGRESQL_DATABASE'] %>"
username: "<%= ENV['POSTGRESQL_USERNAME'] %>"
password: "<%= ENV['POSTGRESQL_PASSWORD'] %>"

primary_replica:
<<: *default
replica: true
host: "<%= ENV['POSTGRESQL_SLAVE_ADDRESSES'] %>"
host: "<%= ENV['POSTGRESQL_PRIMARY_REPLICA_ADDRESS'] %>"
database: "<%= ENV['POSTGRESQL_DATABASE'] %>"
username: "<%= ENV['POSTGRESQL_USERNAME'] %>"
password: "<%= ENV['POSTGRESQL_PASSWORD'] %>"

analytics:
<<: *default
database: bikeindex_analytics
migrations_paths: db/analytics_migrate
host: "<%= ENV['ANALYTICS_DB_ADDRESSES'] %>"
host: "<%= ENV['POSTGRESQL_ANALYTICS_ADDRESS'] %>"
database: "<%= ENV['ANALYTICS_DB_DATABASE'] %>"
username: "<%= ENV['ANALYTICS_DB_USERNAME'] %>"
password: "<%= ENV['ANALYTICS_DB_PASSWORD'] %>"
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/bikes_controller_spec.rb
Expand Up @@ -459,7 +459,7 @@
context "valid" do
include_context :geocoder_real
context "with old style date input" do
it "creates a new ownership and bike from an organization" do
it "creates a new ownership and bike from an organization", :flaky do
VCR.use_cassette("bikes_controller-create-stolen-chicago", match_requests_on: [:path]) do
expect {
post :create, params: {bike: bike_params, stolen_record: stolen_params}
Expand Down
2 changes: 1 addition & 1 deletion spec/services/credibility_scorer_spec.rb
Expand Up @@ -297,7 +297,7 @@
let(:organization) { FactoryBot.create(:organization_with_organization_features) }
let!(:membership) { FactoryBot.create(:membership_claimed, user: user, organization: organization) }
let!(:payment) { FactoryBot.create(:payment, user: user) }
it "returns just user_trusted_organization_member" do
it "returns just user_trusted_organization_member", :flaky do
expect(user.organizations.pluck(:id)).to eq([organization.id])
expect(subject.bike_user_badges(bike)).to match_array(%i[user_trusted_organization_member user_supporter])
end
Expand Down