From a65bb79bcba9d6475ccfc0157c5af5964089b961 Mon Sep 17 00:00:00 2001 From: Paulo Sousa Date: Fri, 14 Jun 2024 14:11:12 -0300 Subject: [PATCH] using ubuntu 22.04 for ruby, python and lua --- lua/Dockerfile | 2 +- python/Dockerfile | 2 +- ruby/Dockerfile | 2 +- ruby/deploy | 2 +- tests/ruby/tests.bats | 26 +++++++++++++------------- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lua/Dockerfile b/lua/Dockerfile index 79999d7..f56b3b4 100644 --- a/lua/Dockerfile +++ b/lua/Dockerfile @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. -FROM tsuru/base-platform:24.04 +FROM tsuru/base-platform:22.04 COPY . /var/lib/tsuru/lua RUN set -ex \ && sudo /var/lib/tsuru/lua/install \ diff --git a/python/Dockerfile b/python/Dockerfile index c1feee5..4ab1019 100644 --- a/python/Dockerfile +++ b/python/Dockerfile @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. -FROM tsuru/base-platform:24.04 +FROM tsuru/base-platform:22.04 COPY ./ /var/lib/tsuru/python/ RUN set -ex \ && sudo /var/lib/tsuru/python/install \ diff --git a/ruby/Dockerfile b/ruby/Dockerfile index 05fb085..d796843 100644 --- a/ruby/Dockerfile +++ b/ruby/Dockerfile @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. -FROM tsuru/base-platform:24.04 +FROM tsuru/base-platform:22.04 COPY . /var/lib/tsuru/ruby RUN set -ex \ && sudo /var/lib/tsuru/ruby/install \ diff --git a/ruby/deploy b/ruby/deploy index 40f90c8..4676988 100755 --- a/ruby/deploy +++ b/ruby/deploy @@ -26,7 +26,7 @@ fi echo "gem: --no-rdoc --no-ri" > ~/.gemrc -RUBY_VERSION=${RUBY_VERSION:-2.7.7} +RUBY_VERSION=${RUBY_VERSION:-3.1.6} echo "-- Using ruby version: $RUBY_VERSION --" diff --git a/tests/ruby/tests.bats b/tests/ruby/tests.bats index bd551d0..77761e4 100644 --- a/tests/ruby/tests.bats +++ b/tests/ruby/tests.bats @@ -19,19 +19,19 @@ load 'bats-assert-master/load' dpkg -s build-essential | grep "install ok installed" } -@test "install ruby version 2.7.7 as default" { +@test "install ruby version 3.1.6 as default" { run /var/lib/tsuru/deploy run /home/application/ruby/bin/ruby --version assert_success - [[ "$output" == *"2.7.7"* ]] + [[ "$output" == *"3.1.6"* ]] } @test "install specific ruby version" { - export RUBY_VERSION="2.6.6" + export RUBY_VERSION="3.2.1" run /var/lib/tsuru/deploy run /home/application/ruby/bin/ruby --version assert_success - [[ "$output" == *"2.6.6"* ]] + [[ "$output" == *"3.2.1"* ]] } @test "deploy fails on invalid ruby version" { @@ -50,18 +50,18 @@ load 'bats-assert-master/load' } @test "parse ruby version from .ruby-version" { - echo "ruby-2.6.9" > ${CURRENT_DIR}/.ruby-version + echo "ruby-3.2.2" > ${CURRENT_DIR}/.ruby-version run /var/lib/tsuru/deploy run /home/application/ruby/bin/ruby --version assert_success - [[ "$output" == *"2.6.9"* ]] + [[ "$output" == *"3.2.2"* ]] rm ${CURRENT_DIR}/.ruby-version } -@test "detect ruby version 2.6.6 on Gemfile" { +@test "detect ruby version 3.2.1 on Gemfile" { echo "source 'https://rubygems.org'" > ${CURRENT_DIR}/Gemfile echo "gem 'hello-world', '1.2.0'" >> ${CURRENT_DIR}/Gemfile - echo "ruby '2.6.6'" >> ${CURRENT_DIR}/Gemfile + echo "ruby '3.2.1'" >> ${CURRENT_DIR}/Gemfile cat <${CURRENT_DIR}/Gemfile.lock GEM remote: https://rubygems.org/ @@ -75,7 +75,7 @@ DEPENDENCIES hello-world (= 1.2.0) RUBY VERSION - ruby 2.6.6p146 + ruby 3.2.1p146 BUNDLED WITH 2.0.1 @@ -83,11 +83,11 @@ EOF run /var/lib/tsuru/deploy assert_success - [[ "$output" == *"-- Using ruby version: 2.6.6 --"* ]] + [[ "$output" == *"-- Using ruby version: 3.2.1 --"* ]] } @test "bundle install when provide Gemfile and reuse already installed gem" { - echo "ruby-2.7.5" > ${CURRENT_DIR}/.ruby-version + echo "ruby-3.2.2" > ${CURRENT_DIR}/.ruby-version echo "source 'https://rubygems.org'" > ${CURRENT_DIR}/Gemfile echo "gem 'hello-world', '1.2.0'" >> ${CURRENT_DIR}/Gemfile cat <${CURRENT_DIR}/Gemfile.lock @@ -117,7 +117,7 @@ EOF } @test "using bundle inside Gemfile.lock and ignore bundle vendoring version for ruby >= 2.6" { - echo "ruby-2.6.6" > ${CURRENT_DIR}/.ruby-version + echo "ruby-3.2.1" > ${CURRENT_DIR}/.ruby-version echo "source 'https://rubygems.org'" > ${CURRENT_DIR}/Gemfile echo "gem 'hello-world', '1.2.0'" >> ${CURRENT_DIR}/Gemfile cat <${CURRENT_DIR}/Gemfile.lock @@ -147,7 +147,7 @@ EOF } @test "bundle install when provide Gemfile with no bundled with section" { - echo "ruby-2.7.4" > ${CURRENT_DIR}/.ruby-version + echo "ruby-3.1.2" > ${CURRENT_DIR}/.ruby-version echo "source 'https://rubygems.org'" > ${CURRENT_DIR}/Gemfile echo "gem 'hello-world', '1.2.0'" >> ${CURRENT_DIR}/Gemfile cat <${CURRENT_DIR}/Gemfile.lock