Просмотр исходного кода

Maintenance: Improve gem installation configuration.

The docker images previously installed Ruby gems globally and without `frozen` lockfile. Improve this by switching to Bundler's `deployment` mode.
Martin Gruner 10 месяцев назад
Родитель
Сommit
59b5334e46

+ 1 - 2
.github/workflows/ci/pre.sh

@@ -6,8 +6,7 @@ set -o pipefail
 # shellcheck disable=SC1091
 source /etc/profile.d/rvm.sh # ensure RVM is loaded
 
-bundle config set --local frozen 'true'
-bundle config set --local path 'vendor'
+bundle config set --local deployment 'true'
 bundle install -j "$(nproc)"
 yarn install
 yarn cypress:install

+ 1 - 1
.github/workflows/docker-ci.yaml

@@ -44,5 +44,5 @@ jobs:
           cd zammad-docker-compose
           docker load --input /tmp/zammad-local.tar
           docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.override-local.yml up --detach
-          docker cp .github/auto_wizard.json zammad-docker-compose_zammad-railsserver_1:/opt/zammad/var
+          docker cp .github/auto_wizard.json zammad-docker-compose_zammad-railsserver_1:/opt/zammad/tmp
           .github/tests.sh

+ 1 - 2
.gitlab/ci/__includes__/scripts.yml

@@ -3,8 +3,7 @@
     - source /etc/profile.d/rvm.sh # ensure RVM is loaded
   bundle_install:
     - echo -e "\\e[0Ksection_start:`date +%s`:bundle_install[collapsed=true]\\r\\e[0Kbundle install"
-    - bundle config set --local frozen 'true'
-    - bundle config set --local path 'vendor'
+    - bundle config set --local deployment 'true'
     - bundle install -j $(nproc)
     - echo -e "\\e[0Ksection_end:`date +%s`:bundle_install\\r\\e[0K"
   yarn_install:

+ 2 - 1
contrib/docker/setup.sh

@@ -20,7 +20,8 @@ if [ "$1" = 'builder' ]; then
   su - postgres bash -c "createdb --encoding=utf8 --owner=zammad zammad"
 
   cd "${ZAMMAD_DIR}"
-  bundle config set without 'test development mysql'
+  bundle config set --local without 'test development mysql'
+  bundle config set --local deployment 'true'
   bundle install
 
   touch db/schema.rb