Skip to content

Commit

Permalink
Maintenance: Improve gem installation configuration.
Browse files Browse the repository at this point in the history
The docker images previously installed Ruby gems globally and without `frozen` lockfile. Improve this by switching to Bundler's `deployment` mode.
  • Loading branch information
mgruner committed Apr 29, 2024
1 parent 9c01b03 commit 59b5334
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci/pre.sh
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-ci.yaml
Expand Up @@ -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
3 changes: 1 addition & 2 deletions .gitlab/ci/__includes__/scripts.yml
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion contrib/docker/setup.sh
Expand Up @@ -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
Expand Down

0 comments on commit 59b5334

Please sign in to comment.