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

Upgrade to Ruby 2.4.4 (fixes #2824) #3253

Merged
merged 25 commits into from
Aug 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e3f8df0
Added strace option and artifact
icarito Aug 10, 2018
315d2ee
Restore Gitlab and add strace to Makefile
icarito Aug 11, 2018
1d9db55
Use strace within container
icarito Aug 11, 2018
5f90d81
Give more trace output
icarito Aug 11, 2018
0744f67
Switch invocation of passenger to fork 9 processes in testing
icarito Aug 12, 2018
dbd3c03
256 string length. No op for triggering builds.
icarito Aug 15, 2018
ad0ad66
Try to speed up by not running bower / bundler
icarito Aug 15, 2018
0652488
Build, then start.
icarito Aug 15, 2018
99ddf56
Built before
icarito Aug 15, 2018
4cd1ad4
Ignore logs in container
icarito Aug 15, 2018
71665ee
Try with newer docker ruby image
icarito Aug 16, 2018
df95e53
Set ruby version in Gemfile to 2.4.4
icarito Aug 16, 2018
fe2a1ec
Increase trace log to 512
icarito Aug 16, 2018
54c24e3
Don't export Redis port
icarito Aug 22, 2018
9eb5679
Merge branch 'not_export_redis_port' of http://github.com/publiclab/p…
icarito Aug 22, 2018
86f3a2c
Don't export web app port for testing
icarito Aug 22, 2018
bb337a0
Set explicit Ruby version in Dockerfile
icarito Aug 22, 2018
3bbbeff
Avoid running bundle in Travis
icarito Aug 22, 2018
4060104
Move strace to Gitlab to save disk space.
icarito Aug 25, 2018
b005e34
Add strace and artifacts to tests.
icarito Aug 25, 2018
cfef152
Remove redundant bundle and bower calls.
icarito Aug 25, 2018
5f4ba86
Add capability to be able to strace on Gitlab.
icarito Aug 25, 2018
73dd05e
Run bower in Gitlab
icarito Aug 25, 2018
34265fc
Remove bash
icarito Aug 25, 2018
d3302cb
Ignore tmp dir from docker container
icarito Aug 25, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ public/system
publiclab.org
log
.git
*.log
tmp
14 changes: 11 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,20 @@ before_script:
- apk add --no-cache py-pip && pip install docker-compose
- docker-compose build
- docker-compose up -d
- docker-compose exec -T web bundle install
- docker-compose exec -T web rake db:setup
- docker-compose exec -T web rake db:migrate
- docker-compose exec -T web bower install --allow-root

job:
script:
- docker-compose exec -T web rake test:all
- docker-compose exec -T web rails test -d
- docker-compose exec -T web strace -s 512 -o log/trace1.log rake test:all
- tail -n 3000 log/trace1.log > log/trace1.tail.log
- docker-compose exec -T web strace -s 512 -o log/trace2.log rails test -d
- tail -n 3000 log/trace2.log > log/trace2.tail.log
artifacts:
when: on_failure
paths:
- log/trace1.log
- log/trace1.tail.log
- log/trace2.log
- log/trace2.tail.log
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ services:
env:
- COMPOSE_FILE=./containers/docker-compose-testing.yml

before_script:
- bundle install

before_install:
- echo -e "repo_token:\n $COVERALLS_REPO_TOKEN" >> ./.coveralls.yml

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dockerfile # Plots2
# https://github.com/publiclab/plots2

FROM ruby:2.4.1-stretch
FROM ruby:2.4.4-stretch

LABEL description="This image deploys Plots2."

Expand All @@ -18,7 +18,7 @@ ENV PHANTOMJS_VERSION 2.1.1

# Install dependencies
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get update -qq && apt-get install -y build-essential bundler libmariadbclient-dev ruby-rmagick libfreeimage3 wget curl procps cron make nodejs
RUN apt-get update -qq && apt-get install -y build-essential bundler libmariadbclient-dev ruby-rmagick libfreeimage3 wget curl procps cron make nodejs strace
RUN wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; tar -xvf /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C /opt ; cp /opt/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin/* /usr/local/bin/
RUN npm install -g bower

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source 'https://rubygems.org'
ruby '2.4.1'
ruby '2.4.4'

git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ deploy-container:

test-container:
docker-compose up -d
docker-compose exec -T web bundle install
docker-compose exec -T web rake db:setup
docker-compose exec -T web rake db:migrate
docker-compose exec -T web bower install --allow-root
docker-compose exec -T web rake test:all
docker-compose exec -T web rails test -d
docker-compose down
Expand Down
2 changes: 0 additions & 2 deletions containers/docker-compose-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ services:
restart: on-failure:5
redis:
image: redis:latest
ports:
- '127.0.0.1:6379:6379'
command: redis-server
sidekiq:
build: ..
Expand Down
2 changes: 0 additions & 2 deletions containers/docker-compose-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ services:
restart: on-failure:5
redis:
image: redis:latest
ports:
- '127.0.0.1:6379:6379'
command: redis-server
sidekiq:
build: ..
Expand Down
8 changes: 3 additions & 5 deletions containers/docker-compose-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ services:
# if you want to re-import simply put away ../../mysql/*
redis:
image: redis:latest
ports:
- '6379:6379'
command: redis-server
web:
build: ..
command: /bin/bash -c "sleep 5 && passenger start -p 4000"
cap_add:
- SYS_PTRACE
command: /bin/bash -c "sleep 5 && /usr/local/bundle/bin/passenger start --max-pool-size 9 --min-instances 9 -p 4000"
environment:
- RAILS_ENV=${RAILS_ENV}
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
Expand All @@ -32,8 +32,6 @@ services:
- redis
volumes:
- ..:/app
ports:
- "127.0.0.1:4000:4000"
restart: unless-stopped
sidekiq:
build: ..
Expand Down
2 changes: 0 additions & 2 deletions containers/docker-compose-unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ services:
restart: on-failure:5
redis:
image: redis:latest
ports:
- '127.0.0.1:6379:6379'
command: redis-server
sidekiq:
build: ..
Expand Down