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

Update sharetribe #89

Open
wants to merge 1,049 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1049 commits
Select commit Hold shift + click to select a range
67a85bd
Merge pull request #26 from sharetribe/duplicate_social_media_links
thomasmalbaux May 26, 2021
037932a
Merge pull request #30 from sharetribe/bump_json_update
thomasmalbaux May 26, 2021
603eeed
Merge pull request #31 from sharetribe/redirect_to_homepage
thomasmalbaux May 27, 2021
54d2699
Added some new official languages
thomasmalbaux May 27, 2021
b9bf6c5
Merge pull request #33 from sharetribe/update-official-languages-list
thomasmalbaux May 27, 2021
0fd1640
WTI update
sharetribe-apps May 27, 2021
f679d18
Merge pull request #34 from sharetribe/wti-update-gh-2021-05-27-20-17-19
github-actions[bot] May 27, 2021
b93c005
Update copy text for consistency
thomasmalbaux May 28, 2021
27dbd9d
Fix tests
thomasmalbaux May 29, 2021
8fc4d24
[Bug] Facebook & LinkedIn logos too small on signup and login pages
Charly3X May 28, 2021
3fdff20
Merge pull request #35 from sharetribe/facebook_linkedin_logos
thomasmalbaux Jun 1, 2021
46a0660
Merge pull request #28 from sharetribe/custom_script_new_fiedls
thomasmalbaux Jun 1, 2021
5b1209d
Admin2 wti pull
thomasmalbaux Jun 1, 2021
1fe8a17
[Maintenance] Dependencies updates
Charly3X Jun 1, 2021
27056fe
wti pull
thomasmalbaux Jun 1, 2021
e8fcb07
[Maintenance] Dependencies updates
Charly3X Jun 1, 2021
0388e3d
WTI update
sharetribe-apps Jun 2, 2021
a57f68e
Merge pull request #40 from sharetribe/wti-update-gh-2021-06-02-10-53-07
kingakoterska Jun 2, 2021
44e1190
[Bug] Email sending feature produces error with certain sender names
Charly3X Jun 1, 2021
2b0a1b2
WTI update
sharetribe-apps Jun 14, 2021
60812a4
Merge pull request #41 from sharetribe/wti-update-gh-2021-06-14-21-46-44
github-actions[bot] Jun 14, 2021
b1c10a4
Merge pull request #37 from sharetribe/maintenance_dependencies_updates
thomasmalbaux Jun 15, 2021
5b4a408
Merge pull request #39 from sharetribe/bug_email_sending
thomasmalbaux Jun 15, 2021
8b56ac0
WTI update
sharetribe-apps Jun 28, 2021
418463a
Merge pull request #42 from sharetribe/wti-update-gh-2021-06-28-20-24-38
thomas-rocca Jun 28, 2021
8d45bb8
wti pull 20210629
Luis-RG Jun 29, 2021
7b733a4
Merge pull request #43 from sharetribe/wti-pull-20210629
Luis-RG Jun 29, 2021
273ccee
wti pull 2021-07-08
Luis-RG Jul 8, 2021
5bb0ea2
Merge pull request #46 from sharetribe/wti-pull-20210708
Luis-RG Jul 9, 2021
1113d6f
WTI update
sharetribe-apps Jul 9, 2021
f655a1e
Merge pull request #47 from sharetribe/wti-update-gh-2021-07-09-13-24-17
github-actions[bot] Jul 9, 2021
4ed88d5
[Bug] Custom Landing Page - BrowserDetectVideoAutoplay is not defined
Charly3X Jul 14, 2021
db0c34e
[Bug] Checkout fails when the total of minimum seller + buyer fees is…
Charly3X Jul 14, 2021
1f25e06
Validation for the Google Analytics tracking ID field
Charly3X Jul 15, 2021
ffd7a06
WTI update
sharetribe-apps Jul 19, 2021
1f71dcf
Merge pull request #53 from sharetribe/wti-update-gh-2021-07-19-06-44-02
github-actions[bot] Jul 19, 2021
aa4bd3d
[Bug] module is not defined
Charly3X Jul 23, 2021
0f08563
[Bug] Listing field numbers edited as decimals instead of integers
Charly3X Jul 23, 2021
88d7a08
WTI update
sharetribe-apps Jul 27, 2021
66b6f1a
Merge pull request #56 from sharetribe/wti-update-gh-2021-07-27-23-28-07
github-actions[bot] Jul 27, 2021
64f7d7a
Merge pull request #54 from sharetribe/bug_module_not_defined
thomasmalbaux Aug 3, 2021
46aff66
Merge pull request #52 from sharetribe/validate_google_analytics
thomasmalbaux Aug 3, 2021
55352e7
Merge pull request #50 from sharetribe/custom_landing_page_fix
thomasmalbaux Aug 3, 2021
d63b941
wti pull admin2
thomasmalbaux Aug 3, 2021
9feab6e
Bump addressable from 2.6.0 to 2.8.0
dependabot[bot] Aug 3, 2021
3e00b77
Merge pull request #57 from sharetribe/dependabot/bundler/addressable…
thomasmalbaux Aug 3, 2021
fc077e1
Merge pull request #51 from sharetribe/fix_checkout_fails
thomasmalbaux Aug 3, 2021
e541da8
Copy texts updates
thomasmalbaux Aug 3, 2021
0de70df
Copy text updates
thomasmalbaux Aug 3, 2021
3bfcd9d
Copy text updates
thomasmalbaux Aug 3, 2021
57d8e24
wti pull admin2
thomasmalbaux Aug 3, 2021
998e075
Copy text update
thomasmalbaux Aug 4, 2021
5653654
Copy text updates
thomasmalbaux Aug 4, 2021
cfccc3d
WTI update
sharetribe-apps Aug 5, 2021
a52b114
Merge pull request #58 from sharetribe/wti-update-gh-2021-08-05-07-10-05
github-actions[bot] Aug 5, 2021
b74f924
WTI pull Admin 2 - Adds Spanish
thomasmalbaux Aug 5, 2021
546100c
Merge pull request #59 from sharetribe/wti-pull-admin2-spanish
thomasmalbaux Aug 5, 2021
bd1b16a
WTI update
sharetribe-apps Aug 6, 2021
bfaaf9c
Merge pull request #60 from sharetribe/wti-update-gh-2021-08-06-07-49-52
github-actions[bot] Aug 6, 2021
6ca7f6d
Syntax styling of custom script fields
Charly3X Jul 14, 2021
0de3d40
[Bug] Subcategory of an only top category title not displayed correctly
Charly3X Aug 23, 2021
4f7c7e0
[Bug] Subcategory of an only top category title not displayed correctly
Charly3X Aug 23, 2021
2d929f0
WTI update
sharetribe-apps Sep 10, 2021
788f672
Merge pull request #63 from sharetribe/wti-update-gh-2021-09-10-13-14-29
github-actions[bot] Sep 10, 2021
37ab2bd
Fix package installation on Debian buster
bladealslayer Sep 10, 2021
990e8a0
Merge pull request #64 from sharetribe/ci-fix-buster
bladealslayer Sep 10, 2021
8df98b0
Use working pgp keyservers
bladealslayer Sep 10, 2021
fdfdc57
Refresh Dockerfile
bladealslayer Sep 10, 2021
d866101
Merge pull request #65 from sharetribe/node-keyservers
bladealslayer Sep 10, 2021
753ab1f
Merge pull request #55 from sharetribe/listing_field_numbers_edited
thomasmalbaux Sep 15, 2021
d5725c3
Merge branch 'master' into subcategory_bug_display
thomasmalbaux Sep 15, 2021
2557705
Merge pull request #61 from sharetribe/subcategory_bug_display
thomasmalbaux Sep 15, 2021
920269e
Merge pull request #48 from sharetribe/syntax_styling
thomasmalbaux Sep 16, 2021
ab2d83e
Update Academy promotional image in Admin panel
thomasmalbaux Sep 16, 2021
499f5d2
WTI update
sharetribe-apps Sep 22, 2021
bb8b157
Merge pull request #67 from sharetribe/wti-update-gh-2021-09-22-11-28-54
github-actions[bot] Sep 22, 2021
0ef1c3d
Copy text update
thomasmalbaux Sep 23, 2021
73005c1
WTI update
sharetribe-apps Sep 23, 2021
95dbfe3
Merge pull request #68 from sharetribe/wti-update-gh-2021-09-23-21-07-16
github-actions[bot] Sep 23, 2021
487d458
Add rake task for migrating CLP images to new-style paths on S3
bladealslayer Jul 2, 2021
6de27dc
Merge pull request #44 from sharetribe/clp-migration-task
bladealslayer Sep 24, 2021
f761ec0
Use community id instead of ident for CLP image paths
bladealslayer Jul 2, 2021
f3b8931
Fix asset resolver using ident instead of id
bladealslayer Sep 24, 2021
3f65ede
Temporarily disable UI for editing CLP
bladealslayer Sep 24, 2021
cff85a2
Bump nokogiri from 1.11.6 to 1.12.5
dependabot[bot] Sep 28, 2021
224a44a
Merge pull request #69 from sharetribe/disable-clp-edit
bladealslayer Sep 28, 2021
760b8c6
Merge pull request #45 from sharetribe/clp-cid-path
bladealslayer Sep 28, 2021
49ab9e7
Revert "Temporarily disable UI for editing CLP"
bladealslayer Sep 28, 2021
71f8c53
Merge pull request #71 from sharetribe/revert-disable-editor
bladealslayer Sep 28, 2021
cbf815a
Merge pull request #70 from sharetribe/dependabot/bundler/nokogiri-1.…
thomasmalbaux Sep 28, 2021
a7d4384
Add staging's secret_key_base
sauloperez Nov 27, 2019
e6dca1d
Configure database settings for staging
sauloperez Nov 27, 2019
59991c7
Add a fallback database settings for staging
sauloperez Nov 27, 2019
a9d8583
Do not load the active storage decorator
sauloperez Nov 28, 2019
946a312
Setup Unicorn app server for production-like envs
sauloperez Nov 28, 2019
67011ea
Change Unicorn to listen to port instead of socket
sauloperez Nov 28, 2019
52a9d15
Configure SMTP vars
sauloperez Dec 16, 2019
cc8694f
Disable New Relic
sauloperez Dec 16, 2019
2d1ac6f
Daemonize delayed job
sauloperez Dec 16, 2019
ed4ff6e
Fix paths referred to in the Unicorn config
sauloperez Dec 16, 2019
7f47270
Use current/ as Unicorn workin directory
sauloperez Dec 17, 2019
1a4996e
Revert "Configure SMTP vars"
sauloperez Dec 17, 2019
3625e06
Configure mail-from for emails
sauloperez Dec 17, 2019
8d4022e
Log Delayed Job in log/delayed_job.log
sauloperez Dec 17, 2019
0ee0e89
Remove Rails backtrace silencers
sauloperez Dec 18, 2019
8a7875d
Fetch SMTP auth method from APP_CONFIG
sauloperez Dec 18, 2019
15a1f05
Define domain to generate app-links from
sauloperez Dec 19, 2019
67409c8
Skip failing tests for now
sauloperez Jan 28, 2020
f9e64c9
Point Circle CI README badge to coopdevs repo
raneq Feb 10, 2020
1ddddf5
Comment more failing tests due to community domain
raneq Feb 10, 2020
4bbd078
Comment out more failing tests because of domain name vars
raneq Feb 10, 2020
06006a3
Skip failing Cucumber scenario
sauloperez Feb 10, 2020
5e7071d
Enable Stripe through a rake task and seed data
sauloperez Feb 21, 2020
909a3ed
New font family Montserrat
sseerrggii Mar 6, 2020
911286a
suggested changes
sseerrggii Mar 10, 2020
3c123b9
font things
sseerrggii Mar 10, 2020
7202198
Recreate next.donalo.org community config in seeds
sauloperez Mar 23, 2020
1a87321
Implement dev env with brand new docker-compose
sauloperez Mar 20, 2020
1f59e0c
Install mysql-client in the web container
sauloperez Mar 20, 2020
3aa9548
Build a web image suitable for development
sauloperez Mar 23, 2020
5509199
Run web allocating a TTY and keep stdin open
sauloperez Mar 23, 2020
19ef41c
Use app's config/ in dev mode with Docker
sauloperez Mar 23, 2020
846ded5
Do not ignore any regular files in Docker
sauloperez Mar 23, 2020
ff60633
Keep container's node_modules after copying code
sauloperez Mar 23, 2020
736f28d
Build the React bundle with webpack in development
sauloperez Mar 23, 2020
a6faca8
Temp. fix for `ensure-node-version`
sauloperez Mar 23, 2020
260abe9
Fix inconsistent marketplace seeding
sauloperez Mar 27, 2020
92746f3
Doc how to run Donalo's dev env
sauloperez Mar 27, 2020
f73560d
Fix "Montserrat Alternate" font-family declaration
sauloperez Mar 27, 2020
61aabab
Add a container to run a background worker
sauloperez Apr 2, 2020
a85fdf8
add rails-server-assets to docker compose
Morantron Apr 3, 2020
0958640
adding donalo_payments engine with a few monkey patches
Morantron Apr 22, 2020
ae18531
add missing patches
Morantron Apr 22, 2020
e013bd0
include engine in gemfile
Morantron Apr 22, 2020
718281c
change app font to Montserrat
sseerrggii Apr 26, 2020
138ef15
patch do_catpure method to properly capture method without seller_acc…
Morantron May 4, 2020
4ae6738
removing rails engine generation :poop:
Morantron May 4, 2020
d750c91
make rubocop happy
Morantron May 4, 2020
6b25fab
Add weight from 300 to 800 regular and italic
sseerrggii May 13, 2020
4887c92
Set up sphinx in development
sauloperez Apr 24, 2020
1c51d66
Fix web when app server was not properly shut down
sauloperez Apr 24, 2020
1e64a8e
Run Sphinx in foreground so no container is killed
sauloperez Apr 30, 2020
b93ad77
Doc use of COMPOSE_FILE
sauloperez May 15, 2020
0097981
Fix long line and identation
sauloperez May 15, 2020
f04caa2
Connect to search container using its net hostname
sauloperez May 15, 2020
cb866ea
Run Sphinx and DJ in the same container
sauloperez May 18, 2020
074c317
hide payment settings
Morantron May 20, 2020
3b14277
Fix rubocop style violation
sauloperez May 21, 2020
47cc9fe
Skip unrelated failing specs
sauloperez May 21, 2020
800466e
dont hide payment settings when running tests
Morantron May 21, 2020
678e10e
Remove broken specs by brute force
sauloperez May 21, 2020
3b44078
move payments engine to engines/ folder
Morantron May 22, 2020
403dde2
rename engine s/donalo_payments/donalo
Morantron May 22, 2020
87892b3
move stock stuff from the other branch into unified engine
Morantron May 22, 2020
451caef
persist stock in custom field, add minimum required quantity
Morantron May 25, 2020
aa93563
change minimum_required_units_field hardcoded name
Morantron Jun 3, 2020
c26c72c
add stock/minimum quantity to seed data
Morantron Jun 3, 2020
4aa2505
close listing after payment is captured when it's out of stock
Morantron Jun 4, 2020
13c98b3
hide price for non-admins
Morantron Jun 4, 2020
143607d
Do not configure Thinking Sphinx twice
sauloperez Jun 4, 2020
aff059f
dont 💥 when user is not logged in
Morantron Jun 5, 2020
4c2c9ef
Enable customizable footer
sauloperez Jun 8, 2020
cb9cac5
Gitignore ctags file
sauloperez Jun 8, 2020
18800cb
Make Rubocop happy
sauloperez Jun 8, 2020
59e9599
stub stock/minimum_required_units injected methods
Morantron Jun 9, 2020
9bd7403
also stub donalo stuff in cucumber tests
Morantron Jun 9, 2020
47bda4c
Add direnv to avoid `-f docker-compose.dev.yml`
sauloperez Jun 9, 2020
395c467
fix docker related shit with bundle/chrome
Morantron Jun 9, 2020
ca77bf2
add guard for stock_custom_field so tests just work without stubbing …
Morantron Jun 9, 2020
551ba77
Revert "stub stock/minimum_required_units injected methods"
Morantron Jun 9, 2020
a4c70b0
Revert "also stub donalo stuff in cucumber tests"
Morantron Jun 9, 2020
c4a663d
fix rubolol
Morantron Jun 9, 2020
beafbc0
Fix typo
sauloperez Jun 9, 2020
eb4435c
Enable Catalan locale
sauloperez Jun 9, 2020
fbf147a
Fix last changes
sauloperez Jun 9, 2020
0bad14d
fix is_admin check
Morantron Jun 11, 2020
ff2c221
hijack computers category link and redirect to form
Morantron Jun 11, 2020
8363868
add i18n'd stock/min_units fields under price in listings#show
Morantron Jun 11, 2020
325eed8
dont break tests
Morantron Jun 11, 2020
ed6dfa2
Check if dependencies are satisfied before install
sauloperez Jun 10, 2020
abcb468
Override translations from a rake task
sauloperez Jun 10, 2020
ef737bc
DRY and provide a simpler API
sauloperez Jun 10, 2020
43a6ec7
add translations
sseerrggii Jun 15, 2020
ed27e49
show custom fields name in current locale
Morantron Jun 15, 2020
a63c4f4
more custom translations
sseerrggii Jun 15, 2020
be9ce5a
Fix dev env setup
sauloperez Jun 15, 2020
c4997fd
Disable Metrics/LineLength Rubocop cop
sauloperez Jun 15, 2020
0bf4d42
Make it clear that `exec` needs docker running
sauloperez Jun 15, 2020
d77b0ea
fix wrong var in translations
sseerrggii Jun 15, 2020
953dae7
Bring in latest Catalan translation from WTI
sauloperez Jun 16, 2020
08b583e
Fix typo in button
sauloperez Jun 16, 2020
de46160
Make it explicit that direnv needs to be installed
sauloperez Jun 16, 2020
38c6db2
more custom text
sseerrggii Jun 16, 2020
f79b374
more custom translations
sseerrggii Jun 22, 2020
48d1ae4
Disable payment_receipt_to_seller email
sauloperez Jun 22, 2020
a34a773
Remove redundant return statement
sauloperez Jun 22, 2020
64bb6f6
Add production DB configuration
sauloperez Jun 25, 2020
e51381c
Add current categories as seed data
sauloperez Jun 15, 2020
77c4641
Provide dummy defaults so CI doesn't fail
sauloperez Jun 25, 2020
eee4a45
Email copies
sseerrggii Jun 25, 2020
2a4891f
add document link to scroll down target page
sseerrggii Jun 26, 2020
e97f541
last translations
sseerrggii Jun 27, 2020
42dbc6c
Disable payment_settings_reminder
sauloperez Jun 29, 2020
c19a5a4
Setup RSpec in Donalo engine
sauloperez Jun 29, 2020
10622f9
Fix Rubocop violations
sauloperez Jun 29, 2020
0d9bb95
Update Rubocop's donalo engine whitelist
sauloperez Jul 2, 2020
ff46fc6
update availability right after updating stock
Morantron Jul 3, 2020
2cedfac
add valid until in :content_after_listing_price
Morantron Jul 3, 2020
63a0137
Add missing sqlite from Gemfile.lock
sauloperez Jul 6, 2020
3aad51b
Make conditional easier to read
sauloperez Jul 6, 2020
73a84e8
Remove sqlite3 dependency from Donalo engine
sauloperez Jul 6, 2020
933ac17
Temporarily skip landing page specs
sauloperez Jul 6, 2020
aaedf24
hopefully fix tests?
Morantron Jul 6, 2020
e2f17ef
Remove tests-related defensive coding
sauloperez Jul 6, 2020
88284c1
more custom translations
sseerrggii Jul 6, 2020
fe3d76d
Fix Rubocop failure
sauloperez Jul 6, 2020
bca7d65
Add whitespace to fix overriden translations
sauloperez Jul 6, 2020
397a06e
fix translation error
sseerrggii Jul 6, 2020
066c49d
fix translate error
sseerrggii Jul 7, 2020
8389d3b
Copy next.donalo.org's config
sauloperez Jul 7, 2020
879fbe1
Mask `people` data in a DB view
sauloperez Jul 6, 2020
f24fd0f
Set the same filesize limit as in production
sauloperez Jul 16, 2020
32abd0a
Pass the filesize limit to jQuery's fileupload
sauloperez Jul 16, 2020
b5bca6c
ensure stock server side before initiating transaction
Morantron Jul 20, 2020
dae3af1
som improvements
sseerrggii Jul 21, 2020
116d8b3
fix error
sseerrggii Jul 21, 2020
acd3cc7
Fix typo
sauloperez Jul 22, 2020
87cc3d8
Add email column to masked_people DB view
sauloperez Jul 23, 2020
234b759
allow arbitrary html in footer
Morantron Aug 5, 2020
c018036
temp fix for csv export
Morantron Oct 7, 2020
db3e01a
Enable community footer
sauloperez Nov 20, 2020
cb8fcb6
Update people view to get email from emails table
sauloperez Dec 17, 2020
ee767de
Exclude masked_people view from DatabaseCleaner
sauloperez Dec 17, 2020
fe4fe5f
Use Unicorn as app server
sauloperez May 5, 2021
a496f80
Explicitly use Ubuntu 18 on Heroku
sauloperez May 5, 2021
d7e1251
Uprade infamous mimemagic from 3.3.0
sauloperez May 5, 2021
489ee7e
Make Unicorn config compatible with Heroku
sauloperez May 5, 2021
c2bb285
Run migrations on deploy's release stage
sauloperez May 5, 2021
a1905dc
Replace N Redis ENV vars with REDIS_URL
sauloperez May 5, 2021
a9152c7
Added logic to check if a user has Pro role
mllocs May 14, 2021
b28d8e3
Fixed custom fields label
mllocs May 19, 2021
27117be
Fixed PersonRole custom field name
mllocs May 19, 2021
842d863
Define private methods
mllocs May 19, 2021
4de8572
Assign all categories to the same two shapes
sauloperez Jul 6, 2021
35b8777
Fix listing show due to not informed custom fields
sauloperez Jul 6, 2021
4405cd0
Changes in Gemfile
manish-shrivastava Sep 30, 2021
904b026
Fixed typo error in structure.sql file
manish-shrivastava Oct 4, 2021
84a5caf
Specified gem versions for some gem to fix gem dependencies
manish-shrivastava Oct 4, 2021
1521398
Update react-on-rails module version
manish-shrivastava Oct 4, 2021
76a73ac
Fixed typo for config.yml file
manish-shrivastava Oct 4, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1
jobs:
test:
parallelism: 8
parallelism: 12
# Call bash as interactive login shell to make sure nvm is loaded through .bashrc
shell: /bin/bash -ileo pipefail
resource_class: small
Expand Down
67 changes: 0 additions & 67 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,70 +1,3 @@
.git
log
.DS_Store

db/*.sqlite3
db/sphinx
config/*.sphinx.conf
config/database.yml
config/config.yml
config/session_secret
config/gmaps_api_key.yml
config/translation.yml
tmp/
doc/api
doc/app
public/images/listing_images
index/
db/development_structure.sql
old_databases.sql
.bundle
.sass-cache/
capybara*
public/system/favicons
public/system/images
public/system/listing_images
public/system/people
public/system/cover_photos/
public/system/logos/
public/system/small_cover_photos/
public/system/wide_logos/
.loadpath
.project
cg.sh
public/assets/
app/assets/webfonts/
app/assets/stylesheets/customizations-*
app/assets/stylesheets/custom-style-*
config/mangopay.pem
log/*.log
log/*.pid
log/.DS_Store
log/*.age
log/*.db
node_modules
coverage/
.idea/
*.sock
.vagrant
.env

# React on Rails
npm-debug.log*
node_modules
client/node_modules

# Generated js bundles
/app/assets/webpack/*

# Generated i18n-js bundles
/app/assets/javascripts/i18n/*
/client/app/i18n/*
!/client/app/i18n/.keep
/client/app/routes/*
!/client/app/routes/.keep

# Generated assets
/public/webpack/*

# Mocha results
test-results.xml
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export COMPOSE_FILE=docker-compose.dev.yml
244 changes: 244 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
name: Deploy

on:
workflow_dispatch:
inputs:
environment:
description: The environment to deploy to
required: true
default: staging
git_ref:
description: Git ref to deploy
required: true
default: "*selected branch*"
run_migrations:
description: Run db migrations (yes/no)?
required: true
default: "no"

jobs:
deploy:
name: Deploy
runs-on: ubuntu-20.04

steps:
- name: Echo deployment config
env:
DEPLOY_ENV: ${{ github.event.inputs.environment }}
DEPLOY_REF: ${{ github.event.inputs.git_ref }}
RUN_MIGRATIONS: ${{ github.event.inputs.run_migrations }}
run: |
echo "Deploying to: $DEPLOY_ENV"
echo "Deploying ref: $DEPLOY_REF"
echo "Using workflow definition from: $GITHUB_REF"
echo "Initiated by: $GITHUB_ACTOR"
echo "Run migrations: $RUN_MIGRATIONS"

- name: Set app and rack
id: convox_env
env:
DEPLOY_ENV: ${{ github.event.inputs.environment }}
run: |
case "$DEPLOY_ENV" in
production)
echo "::set-output name=app::anarchy"
echo "::set-output name=rack::sharetribe/production"
;;
staging)
echo "::set-output name=app::anarchy"
echo "::set-output name=rack::sharetribe/staging"
;;
*)
echo "Unknown deploy env"
exit 1
;;
esac

- name: Resolve git ref
id: resolve_ref
env:
DEPLOY_REF: ${{ github.event.inputs.git_ref }}
run: if [ "${DEPLOY_REF}" = "*selected branch*" ] ; then echo "::set-output name=ref::$GITHUB_REF" ; else echo "::set-output name=ref::$DEPLOY_REF" ; fi

- name: Create GitHub deployment
uses: bobheadxi/deployments@d214e9228f80adbf4cc2f6e470f2e66ebac5a1b3
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: ${{ github.event.inputs.environment }}
ref: ${{ steps.resolve_ref.outputs.ref }}

- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ steps.resolve_ref.outputs.ref }}

- name: Resolve SHA
id: resolve_sha
run: echo "::set-output name=sha::$(git rev-parse HEAD)"

- name: Checkout toolbelt
uses: actions/checkout@v2
with:
repository: sharetribe/toolbelt
ref: master
# Path must be under the workspace. Take care that it is not included
# in build artifacts. For instance, make sure it is in .gitignore and
# .dockerignore.
path: .toolbelt
persist-credentials: false
ssh-key: ${{ secrets.TOOLBELT_SSH_DEPLOY_KEY }}

- name: Configure AWS credentials
id: configure_aws_credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Pre build hooks
env:
DEPLOY_ENV: ${{ github.event.inputs.environment }}
run: |
source .toolbelt/bin/common-definitions.sh
source .toolbelt/infra/projects/anarchy/deploy-hooks.sh
gh_deploy_hook_pre_build

- name: Set release name
id: set_release
env:
DEPLOY_ENV: ${{ github.event.inputs.environment }}
run: RELEASE="gh-${DEPLOY_ENV}-${GITHUB_SHA}" ; echo "::set-output name=release::$RELEASE"

- name: Set ECR image
id: set_ecr_image
env:
RELEASE: ${{ steps.set_release.outputs.release }}
AWS_ACCOUNT_ID: ${{ steps.configure_aws_credentials.outputs.aws-account-id }}
run: echo "::set-output name=image::${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/anarchy:${RELEASE}"

- name: Login to AWS ECR
uses: aws-actions/amazon-ecr-login@v1

- name: Asset cache
uses: actions/cache@v2
with:
path: ./assets.tar.gz
# The key should include hash of all files that affect the asset build
key: ${{ runner.os }}-assets-${{ hashFiles('app/assets/**', 'client/**', 'config/locales/**', 'package.json', 'vendor/assets/**', 'script/asset-variables.sh') }}

- name: Resolve latest ECR image
id: resolve_latest_ecr_image
env:
AWS_ACCOUNT_ID: ${{ steps.configure_aws_credentials.outputs.aws-account-id }}
DEPLOY_ENV: ${{ github.event.inputs.environment }}
run: |
latest_image_tag=$(aws ecr describe-images --repository-name anarchy --filter tagStatus=TAGGED --query "imageDetails[?starts_with(imageTags[0], 'gh-${DEPLOY_ENV}')] | sort_by(@,& imagePushedAt)[-1].imageTags[0]" --output text)
echo "Latest image tag: ${latest_image_tag}"
if [[ "${latest_image_tag}" != "None" ]] ; then
echo "::set-output name=image::${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/anarchy:${latest_image_tag}"
fi

- name: Pull latest image from ECR
if: ${{ steps.resolve_latest_ecr_image.outputs.image != null }}
env:
LATEST_IMAGE: ${{ steps.resolve_latest_ecr_image.outputs.image }}
run: docker pull "${LATEST_IMAGE}"

- name: Build image
env:
ECR_IMAGE: ${{ steps.set_ecr_image.outputs.image }}
CACHE_IMAGE: ${{ steps.resolve_latest_ecr_image.outputs.image }}
run: |
if [[ -z "${CACHE_IMAGE}" ]] ; then
docker build -t "${ECR_IMAGE}" .
else
docker build -t "${ECR_IMAGE}" --cache-from "${CACHE_IMAGE}" .
fi

- name: Post build hook
env:
DEPLOY_ENV: ${{ github.event.inputs.environment }}
ECR_IMAGE: ${{ steps.set_ecr_image.outputs.image }}
run: |
source .toolbelt/bin/common-definitions.sh
source .toolbelt/infra/projects/anarchy/deploy-hooks.sh
gh_deploy_hook_post_build

- name: Push to ECR
env:
ECR_IMAGE: ${{ steps.set_ecr_image.outputs.image }}
run: docker push "${ECR_IMAGE}"

- name: Pre deploy hook
env:
DEPLOY_ENV: ${{ github.event.inputs.environment }}
run: |
source .toolbelt/bin/common-definitions.sh
source .toolbelt/infra/projects/anarchy/deploy-hooks.sh
gh_deploy_hook_pre_deploy

- name: Download Convox binary
run: aws s3 cp s3://sharetribe-deployment/convox/bin/20210319134118/convox-linux ~/convox && chmod 755 ~/convox

- name: Update Convox manifest
env:
ECR_IMAGE: ${{ steps.set_ecr_image.outputs.image }}
run: 'sed -E -i "s|build: .*|image: ${ECR_IMAGE}|" "docker-compose.app.yml"'

- name: Create Convox release
id: convox_build
env:
CONVOX_HOST: console.convox.com
CONVOX_PASSWORD: ${{ secrets.CONVOX_DEPLOY_KEY }}
CONVOX_RACK: ${{ steps.convox_env.outputs.rack }}
CONVOX_APP: ${{ steps.convox_env.outputs.app }}
RELEASE: ${{ steps.set_release.outputs.release }}
run: |
source .toolbelt/bin/common-definitions.sh
~/convox build --manifest docker-compose.app.yml --rack "${CONVOX_RACK}" --app "${CONVOX_APP}" --id --description "${RELEASE}" | tee out.txt
check_pipe_status && echo -e "\n::set-output name=release::$(tail -n1 out.txt)"

- name: Check pending migrations
if: ${{ github.event.inputs.run_migrations != 'yes' }}
env:
CONVOX_HOST: console.convox.com
CONVOX_PASSWORD: ${{ secrets.CONVOX_DEPLOY_KEY }}
CONVOX_RACK: ${{ steps.convox_env.outputs.rack }}
CONVOX_APP: ${{ steps.convox_env.outputs.app }}
CONVOX_RELEASE: ${{ steps.convox_build.outputs.release }}
run: |
if ! ~/convox run worker --release "${CONVOX_RELEASE}" --rack "${CONVOX_RACK}" --app "${CONVOX_APP}" bundle exec rake "sharetribe:db:migrate:ensure_latest" ; then
echo "There are pending migrations! Run deployment again with Run migrations (yes/no)?: yes."
exit 1
fi

- name: Run migrations
if: ${{ github.event.inputs.run_migrations == 'yes' }}
env:
CONVOX_HOST: console.convox.com
CONVOX_PASSWORD: ${{ secrets.CONVOX_DEPLOY_KEY }}
CONVOX_RACK: ${{ steps.convox_env.outputs.rack }}
CONVOX_APP: ${{ steps.convox_env.outputs.app }}
CONVOX_RELEASE: ${{ steps.convox_build.outputs.release }}
run: ~/convox run worker --release "${CONVOX_RELEASE}" --rack "${CONVOX_RACK}" --app "${CONVOX_APP}" bundle exec rake "sharetribe:db:migrate[pre-deploy]"

- name: Deploy
env:
CONVOX_HOST: console.convox.com
CONVOX_PASSWORD: ${{ secrets.CONVOX_DEPLOY_KEY }}
CONVOX_RACK: ${{ steps.convox_env.outputs.rack }}
CONVOX_APP: ${{ steps.convox_env.outputs.app }}
CONVOX_RELEASE: ${{ steps.convox_build.outputs.release }}
run: ~/convox releases promote "${CONVOX_RELEASE}" --rack "${CONVOX_RACK}" --app "${CONVOX_APP}" --wait

- name: Update GitHub deployment status
uses: bobheadxi/deployments@d214e9228f80adbf4cc2f6e470f2e66ebac5a1b3
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
32 changes: 32 additions & 0 deletions .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Mirror

on:
push:
branches:
- master

jobs:
mirror:
name: Mirror
runs-on: ubuntu-20.04

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: "master"

- name: Write deploy key to file
run: |
mkdir -p /home/runner/.ssh/
echo "${{ secrets.MIRRORING_DEPLOY_KEY }}" >> /home/runner/.ssh/sync
chmod 600 /home/runner/.ssh/sync

- name: Synchronize to public repository
env:
GIT_SSH_COMMAND: ssh -i /home/runner/.ssh/sync
run: |
git remote add public git@github.com:sharetribe/sharetribe.git
git push -f public master
git push -f public --tags
Loading