-
Notifications
You must be signed in to change notification settings - Fork 3
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
Compability, Versioning and Upgrading Penthouse and Using Docker & CircleCI for Developer Experience #16
Merged
Merged
Compability, Versioning and Upgrading Penthouse and Using Docker & CircleCI for Developer Experience #16
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
bb43150
Implement a wroking docker file for ruby,rails,pg version compatabili…
simonireilly 6d0f78b
Continue work on version support through docker
simonireilly 8b05b5f
Linting with standard, running 4.2, 5.1, 5.2 in circleCI
simonireilly 5436602
Attempted fix for MigrationContext
simonireilly fcd861d
Clean up the gemspec and remove old methods
simonireilly 785278c
Remove unnecessary changed from the migration module
simonireilly 3b8279b
Merge branch 'master' into patch/rails-versions-support
simonireilly 499357d
Linting
simonireilly 818195c
Linting
simonireilly 10ab165
Trailing comma
simonireilly 5e582a0
Remove testing of rails versions greater than 5.1.7
simonireilly 89b97a8
Test less versions
simonireilly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/ruby:2.4.1 | ||
|
||
- image: circleci/postgres:9.6.2-alpine | ||
name: postgres | ||
|
||
steps: | ||
- checkout | ||
|
||
- run: bundle install | ||
- run: bundle exec standardrb | ||
- run: rm Gemfile.lock | ||
|
||
- run: RUBY_VERSION=2.4.1 RAILS_VERSION=4.2.11.1 PG_VERSION=0.21.0 bundle install | ||
- run: RUBY_VERSION=2.4.1 RAILS_VERSION=4.2.11.1 PG_VERSION=0.21.0 bundle exec rspec | ||
- run: rm Gemfile.lock | ||
|
||
- run: RUBY_VERSION=2.4.1 RAILS_VERSION=5.1.7 PG_VERSION=0.21.0 bundle install | ||
- run: RUBY_VERSION=2.4.1 RAILS_VERSION=5.1.7 PG_VERSION=0.21.0 bundle exec rspec | ||
- run: rm Gemfile.lock | ||
# Uncomment when adding support for greater rails versions | ||
# | ||
# - run: RUBY_VERSION=2.4.1 RAILS_VERSION=5.2.3 PG_VERSION=1.1.4 bundle install | ||
# - run: RUBY_VERSION=2.4.1 RAILS_VERSION=5.2.3 PG_VERSION=1.1.4 bundle exec rspec | ||
# - run: RUBY_VERSION=2.4.1 RAILS_VERSION=6.0.0 PG_VERSION=0.21.0 bundle install | ||
# - run: RUBY_VERSION=2.4.1 RAILS_VERSION=6.0.0 PG_VERSION=0.21.0 bundle exec rspec |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Gemfile.lock |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
ARG RUBY_VERSION="2.5" | ||
|
||
FROM ruby:$RUBY_VERSION-alpine | ||
|
||
ARG RUBY_VERSION="2.5" | ||
ARG RAILS_VERSION="5.1.4" | ||
ARG PG_VERSION="1.1.4" | ||
|
||
RUN apk add --update build-base postgresql-dev tzdata git | ||
|
||
WORKDIR /app | ||
ADD ./ /app/ | ||
|
||
RUN gem install bundler -v '1.17' | ||
|
||
ENV RUBY_VERSION=$RUBY_VERSION | ||
ENV RAILS_VERSION=$RAILS_VERSION | ||
ENV PG_VERSION=$PG_VERSION | ||
|
||
RUN RUBY_VERSION=$RUBY_VERSION RAILS_VERSION=$RAILS_VERSION PG_VERSION=$PG_VERSION bundle install --jobs=4 --no-cache | ||
|
||
ENTRYPOINT ["bundle", "exec", "rspec"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
source 'https://rubygems.org' | ||
ruby '2.5.7' | ||
source "https://rubygems.org" | ||
ruby ENV.fetch("RUBY_VERSION", "2.3.0") | ||
|
||
group :test do | ||
gem "activesupport", ENV.fetch("RAILS_VERSION", "4.2.2").to_s | ||
gem "activerecord", ENV.fetch("RAILS_VERSION", "4.2.2").to_s | ||
gem "pg", ENV.fetch("PG_VERSION", "0.19.0").to_s | ||
end | ||
|
||
gemspec |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
test-4.2.11.1: # Test rails 4 LTS | ||
RUBY_VERSION=2.3.0 RAILS_VERSION=4.2.11.1 PG_VERSION=0.21.0 docker-compose build | ||
RUBY_VERSION=2.3.0 RAILS_VERSION=4.2.11.1 PG_VERSION=0.21.0 docker-compose run penthouse | ||
|
||
test-5.1.7: # Test rails 5 before migration context | ||
RUBY_VERSION=2.4.0 RAILS_VERSION=5.1.7 PG_VERSION=0.21.0 docker-compose build | ||
RUBY_VERSION=2.4.0 RAILS_VERSION=5.1.7 PG_VERSION=0.21.0 docker-compose run penthouse | ||
|
||
test-5.2.3: # Test rails 5 with migration context | ||
RUBY_VERSION=2.5.0 RAILS_VERSION=5.2.3 PG_VERSION=1.1.4 docker-compose build | ||
RUBY_VERSION=2.5.0 RAILS_VERSION=5.2.3 PG_VERSION=1.1.4 docker-compose run penthouse | ||
|
||
test-6.0.0: # Test rails 6 | ||
RUBY_VERSION=2.6.0 RAILS_VERSION=6.0.0 PG_VERSION=1.1.4 docker-compose build | ||
RUBY_VERSION=2.6.0 RAILS_VERSION=6.0.0 PG_VERSION=1.1.4 docker-compose run penthouse | ||
|
||
test: | ||
make test-4.2.11.1 | ||
make test-5.1.7 | ||
make test-5.2.3 |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: '3.5' | ||
|
||
services: | ||
postgres: | ||
image: postgres:10.5-alpine | ||
ports: | ||
- 5432 | ||
networks: | ||
penthouse: | ||
default: | ||
|
||
penthouse: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.test | ||
args: | ||
RUBY_VERSION: ${RUBY_VERSION:-2.5.0} | ||
RAILS_VERSION: ${RAILS_VERSION:-5.1.7} | ||
PG_VERSION: ${PG_VERSION:-1.1.4} | ||
RAILS_ENV: test | ||
networks: | ||
penthouse: | ||
default: | ||
depends_on: | ||
- postgres | ||
|
||
networks: | ||
penthouse: | ||
driver: bridge | ||
name: penthouse |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we try and add support these versions might need bumped