Regenerate Gemfile.lock before gitlab-sidekiq service start
This commit is contained in:
parent
1f9a380741
commit
e1927013bc
5 changed files with 24 additions and 0 deletions
16
debian/gitlab-update-gemfile-lock.sh
vendored
Executable file
16
debian/gitlab-update-gemfile-lock.sh
vendored
Executable file
|
@ -0,0 +1,16 @@
|
|||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# Read debian specific configuration
|
||||
. /etc/gitlab-common/gitlab-common.conf
|
||||
. /etc/gitlab/gitlab-debian.conf
|
||||
export DB RAILS_ENV
|
||||
|
||||
cd /usr/share/gitlab
|
||||
|
||||
# Remove all lines from Gemfile.lock
|
||||
runuser -u ${gitlab_user} -- sh -c "touch ${gitlab_data_dir}/Gemfile.lock && \
|
||||
truncate -s 0 ${gitlab_data_dir}/Gemfile.lock"
|
||||
# Regenerate Gemfile.lock
|
||||
runuser -u ${gitlab_user} -- sh -c '/usr/bin/bundle install --local'
|
2
debian/gitlab.gitlab-sidekiq.service
vendored
2
debian/gitlab.gitlab-sidekiq.service
vendored
|
@ -12,6 +12,8 @@ Type=simple
|
|||
WorkingDirectory=/usr/share/gitlab
|
||||
EnvironmentFile=/etc/gitlab/gitlab-debian.conf
|
||||
SyslogIdentifier=gitlab-sidekiq
|
||||
ExecStartPre=truncate -s 0 Gemfile.lock
|
||||
ExecStartPre=/usr/bin/bundle install --local
|
||||
ExecStart=/usr/bin/bundle exec sidekiq \
|
||||
-C /etc/gitlab/sidekiq_queues.yml \
|
||||
-e $RAILS_ENV
|
||||
|
|
1
debian/gitlab.install
vendored
1
debian/gitlab.install
vendored
|
@ -12,6 +12,7 @@ debian/conf/nginx.ssl.conf.example usr/lib/gitlab/templates
|
|||
debian/rake-tasks.sh usr/lib/gitlab/scripts
|
||||
debian/gitlab-rake.sh usr/lib/gitlab/scripts
|
||||
debian/gitlab-rails-console.sh usr/lib/gitlab/scripts
|
||||
debian/gitlab-update-gemfile-lock.sh usr/lib/gitlab/scripts
|
||||
.editorconfig usr/share/gitlab
|
||||
.license_encryption_key.pub usr/share/gitlab
|
||||
.markdownlint.json usr/share/gitlab
|
||||
|
|
1
debian/gitlab.links
vendored
1
debian/gitlab.links
vendored
|
@ -37,3 +37,4 @@ usr/share/javascript/fuzzaldrin/fuzzaldrin-plus.js usr/share/gitlab/vendor/asset
|
|||
/var/lib/gitlab/Gemfile.lock /usr/share/gitlab/Gemfile.lock
|
||||
/usr/lib/gitlab/scripts/gitlab-rake.sh /usr/sbin/gitlab-rake
|
||||
/usr/lib/gitlab/scripts/gitlab-rails-console.sh /usr/sbin/gitlab-rails-console
|
||||
/usr/lib/gitlab/scripts/gitlab-update-gemfile-lock.sh /usr/sbin/gitlab-update-gemfile-lock
|
||||
|
|
4
debian/rake-tasks.sh
vendored
4
debian/rake-tasks.sh
vendored
|
@ -10,6 +10,10 @@ cd /usr/share/gitlab
|
|||
|
||||
# Workaround for #966653
|
||||
/usr/bin/gem install -v 1.30.2 grpc
|
||||
# Remove all lines from Gemfile.lock
|
||||
runuser -u ${gitlab_user} -- sh -c "touch ${gitlab_data_dir}/Gemfile.lock && \
|
||||
truncate -s 0 ${gitlab_data_dir}/Gemfile.lock"
|
||||
# Regenerate Gemfile.lock
|
||||
runuser -u ${gitlab_user} -- sh -c '/usr/bin/bundle install --local'
|
||||
|
||||
# Check if the db is already present
|
||||
|
|
Loading…
Reference in a new issue