From 0b2eec4f82b8c99f0501ed7f68c68fef0b57aaf4 Mon Sep 17 00:00:00 2001 From: Jyri-Petteri Paloposki Date: Fri, 11 Dec 2020 18:39:30 +0200 Subject: [PATCH] Move to Ruby 2.7 for the default Docker version as well as the default target for alternative DB's. Fix the Ruby image version with three digits because the most recent versions seem to be somehow broken. --- .github/workflows/continuous-integration.yml | 8 ++++---- Dockerfile | 2 +- Dockerfile-2.5 | 10 +++++----- Dockerfile-2.7 => Dockerfile-2.6 | 10 +++++----- test-envs/docker-compose-2.6-mysql.yml | 2 +- test-envs/docker-compose-2.7-mysql.yml | 2 +- ....6-postgres.yml => docker-compose-2.7-postgres.yml} | 0 ...se-2.6-sqlite.yml => docker-compose-2.7-sqlite.yml} | 0 8 files changed, 17 insertions(+), 17 deletions(-) rename Dockerfile-2.7 => Dockerfile-2.6 (97%) rename test-envs/{docker-compose-2.6-postgres.yml => docker-compose-2.7-postgres.yml} (100%) rename test-envs/{docker-compose-2.6-sqlite.yml => docker-compose-2.7-sqlite.yml} (100%) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 73143937..4ceda594 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -22,17 +22,17 @@ jobs: - uses: actions/checkout@v1 - run: bash -x script/cibuild 2.7 mysql - test26postgres: + test27postgres: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - run: bash -x script/cibuild 2.6 postgres + - run: bash -x script/cibuild 2.7 postgres - test26sqlite: + test27sqlite: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - run: bash -x script/cibuild 2.6 sqlite + - run: bash -x script/cibuild 2.7 sqlite # - run: bash -x script/cibuild 2.5 postgres # - run: bash -x script/cibuild 2.7 postgres diff --git a/Dockerfile b/Dockerfile index bf82d720..303b86b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.6 +FROM ruby:2.7.1 # throw errors if Gemfile has been modified since Gemfile.lock RUN bundle config --global frozen 1 diff --git a/Dockerfile-2.5 b/Dockerfile-2.5 index a3fb50a1..f453241e 100644 --- a/Dockerfile-2.5 +++ b/Dockerfile-2.5 @@ -1,4 +1,4 @@ -FROM ruby:2.5 +FROM ruby:2.5.7 # throw errors if Gemfile has been modified since Gemfile.lock RUN bundle config --global frozen 1 @@ -7,14 +7,14 @@ WORKDIR /app RUN touch /etc/app-env -COPY Gemfile* /app/ -RUN gem install bundler -RUN bundle install --jobs 4 - RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list RUN apt-get update && apt-get install -y yarn +COPY Gemfile* /app/ +RUN gem install bundler +RUN bundle install --jobs 4 + RUN mkdir /app/log COPY . /app/ diff --git a/Dockerfile-2.7 b/Dockerfile-2.6 similarity index 97% rename from Dockerfile-2.7 rename to Dockerfile-2.6 index a68b373d..0bef7e0e 100644 --- a/Dockerfile-2.7 +++ b/Dockerfile-2.6 @@ -1,4 +1,4 @@ -FROM ruby:2.7 +FROM ruby:2.6.5 # throw errors if Gemfile has been modified since Gemfile.lock RUN bundle config --global frozen 1 @@ -7,14 +7,14 @@ WORKDIR /app RUN touch /etc/app-env -COPY Gemfile* /app/ -RUN gem install bundler -RUN bundle install --jobs 4 - RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list RUN apt-get update && apt-get install -y yarn +COPY Gemfile* /app/ +RUN gem install bundler +RUN bundle install --jobs 4 + RUN mkdir /app/log COPY . /app/ diff --git a/test-envs/docker-compose-2.6-mysql.yml b/test-envs/docker-compose-2.6-mysql.yml index 67e67f17..8af77f50 100644 --- a/test-envs/docker-compose-2.6-mysql.yml +++ b/test-envs/docker-compose-2.6-mysql.yml @@ -10,7 +10,7 @@ services: web: build: context: .. - dockerfile: Dockerfile + dockerfile: Dockerfile-2.6 environment: # These are set in script/ci-build, so we need to pass-thru them. RAILS_ENV: $RAILS_ENV diff --git a/test-envs/docker-compose-2.7-mysql.yml b/test-envs/docker-compose-2.7-mysql.yml index 58e433ff..67e67f17 100644 --- a/test-envs/docker-compose-2.7-mysql.yml +++ b/test-envs/docker-compose-2.7-mysql.yml @@ -10,7 +10,7 @@ services: web: build: context: .. - dockerfile: Dockerfile-2.7 + dockerfile: Dockerfile environment: # These are set in script/ci-build, so we need to pass-thru them. RAILS_ENV: $RAILS_ENV diff --git a/test-envs/docker-compose-2.6-postgres.yml b/test-envs/docker-compose-2.7-postgres.yml similarity index 100% rename from test-envs/docker-compose-2.6-postgres.yml rename to test-envs/docker-compose-2.7-postgres.yml diff --git a/test-envs/docker-compose-2.6-sqlite.yml b/test-envs/docker-compose-2.7-sqlite.yml similarity index 100% rename from test-envs/docker-compose-2.6-sqlite.yml rename to test-envs/docker-compose-2.7-sqlite.yml